Fixes h263 mb_info processing. Reported upstream: https://trac.ffmpeg.org/ticket/3586

Index: ffmpeg-2.2.1/libavcodec/utils.c
===================================================================
--- ffmpeg-2.2.1.orig/libavcodec/utils.c	2014-03-24 02:08:02.000000000 +0400
+++ ffmpeg-2.2.1/libavcodec/utils.c	2014-04-24 15:44:44.388552378 +0400
@@ -1942,8 +1942,6 @@
 
     if (ret < 0 || !*got_packet_ptr)
         av_free_packet(avpkt);
-    else
-        av_packet_merge_side_data(avpkt);
 
     emms_c();
     return ret;
@@ -2137,7 +2135,6 @@
     av_frame_unref(picture);
 
     if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type & FF_THREAD_FRAME)) {
-        int did_split = av_packet_split_side_data(&tmp);
         ret = apply_param_change(avctx, &tmp);
         if (ret < 0) {
             av_log(avctx, AV_LOG_ERROR, "Error applying parameter changes.\n");
@@ -2172,11 +2169,6 @@
         emms_c(); //needed to avoid an emms_c() call before every return;
 
         avctx->internal->pkt = NULL;
-        if (did_split) {
-            av_packet_free_side_data(&tmp);
-            if(ret == tmp.size)
-                ret = avpkt->size;
-        }
 
         if (*got_picture_ptr) {
             if (!avctx->refcounted_frames) {
@@ -2284,7 +2276,6 @@
         uint32_t discard_padding = 0;
         // copy to ensure we do not change avpkt
         AVPacket tmp = *avpkt;
-        int did_split = av_packet_split_side_data(&tmp);
         ret = apply_param_change(avctx, &tmp);
         if (ret < 0) {
             av_log(avctx, AV_LOG_ERROR, "Error applying parameter changes.\n");
@@ -2372,11 +2363,6 @@
         }
 fail:
         avctx->internal->pkt = NULL;
-        if (did_split) {
-            av_packet_free_side_data(&tmp);
-            if(ret == tmp.size)
-                ret = avpkt->size;
-        }
 
         if (ret >= 0 && *got_frame_ptr) {
             if (!avctx->refcounted_frames) {
@@ -2491,19 +2477,8 @@
     if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) {
         AVPacket pkt_recoded;
         AVPacket tmp = *avpkt;
-        int did_split = av_packet_split_side_data(&tmp);
         //apply_param_change(avctx, &tmp);
 
-        if (did_split) {
-            /* FFMIN() prevents overflow in case the packet wasn't allocated with
-             * proper padding.
-             * If the side data is smaller than the buffer padding size, the
-             * remaining bytes should have already been filled with zeros by the
-             * original packet allocation anyway. */
-            memset(tmp.data + tmp.size, 0,
-                   FFMIN(avpkt->size - tmp.size, FF_INPUT_BUFFER_PADDING_SIZE));
-        }
-
         pkt_recoded = tmp;
         ret = recode_subtitle(avctx, &pkt_recoded, &tmp);
         if (ret < 0) {
@@ -2549,12 +2524,6 @@
             avctx->internal->pkt = NULL;
         }
 
-        if (did_split) {
-            av_packet_free_side_data(&tmp);
-            if(ret == tmp.size)
-                ret = avpkt->size;
-        }
-
         if (*got_sub_ptr)
             avctx->frame_number++;
     }
Index: ffmpeg-2.2.1/libavformat/mux.c
===================================================================
--- ffmpeg-2.2.1.orig/libavformat/mux.c	2014-03-24 02:07:53.000000000 +0400
+++ ffmpeg-2.2.1/libavformat/mux.c	2014-04-24 15:46:11.041193674 +0400
@@ -522,7 +522,7 @@
  */
 static int write_packet(AVFormatContext *s, AVPacket *pkt)
 {
-    int ret, did_split;
+    int ret;
 
     if (s->output_ts_offset) {
         AVStream *st = s->streams[pkt->stream_index];
@@ -559,7 +559,6 @@
         av_assert2(pkt->dts == AV_NOPTS_VALUE || pkt->dts >= 0);
     }
 
-    did_split = av_packet_split_side_data(pkt);
     if ((pkt->flags & AV_PKT_FLAG_UNCODED_FRAME)) {
         AVFrame *frame = (AVFrame *)pkt->data;
         av_assert0(pkt->size == UNCODED_FRAME_PACKET_SIZE);
@@ -572,9 +571,6 @@
     if (s->flush_packets && s->pb && ret >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS)
         avio_flush(s->pb);
 
-    if (did_split)
-        av_packet_merge_side_data(pkt);
-
     return ret;
 }
 
Index: ffmpeg-2.2.1/libavformat/utils.c
===================================================================
--- ffmpeg-2.2.1.orig/libavformat/utils.c	2014-03-24 02:08:02.000000000 +0400
+++ ffmpeg-2.2.1/libavformat/utils.c	2014-04-24 15:47:47.745910606 +0400
@@ -1528,9 +1528,6 @@
         }
     }
 
-    if (ret >= 0 && !(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))
-        av_packet_merge_side_data(pkt);
-
     if (s->debug & FF_FDEBUG_TS)
         av_log(s, AV_LOG_DEBUG,
                "read_frame_internal stream=%d, pts=%s, dts=%s, "
