Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 30 Sep 2012 12:28:35 +0000 (14:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 30 Sep 2012 12:28:35 +0000 (14:28 +0200)
* qatar/master:
  h264: avoid stuck buffer pointer in decode_nal_units
  mpeg12: fix the semantics of the int* parameter of decode()

Conflicts:
libavcodec/mpeg12.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h264.c
libavcodec/mpeg12.c

Simple merge
@@@ -2266,13 -2210,12 +2266,13 @@@ static int decode_chunks(AVCodecContex
                          s2->error_count += s2->thread_context[i]->error_count;
                  }
  
 -                if (CONFIG_MPEG_VDPAU_DECODER && avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
 +                if (CONFIG_VDPAU && uses_vdpau(avctx))
                      ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count);
  
 +
                  if (slice_end(avctx, picture)) {
                      if (s2->last_picture_ptr || s2->low_delay) //FIXME merge with the stuff in mpeg_decode_slice
-                         *data_size = sizeof(AVPicture);
+                         *got_output = 1;
                  }
              }
              s2->pict_type = 0;
@@@ -2545,13 -2450,8 +2545,13 @@@ static int mpeg_decode_frame(AVCodecCon
  
      s->slice_count = 0;
  
 -    if (avctx->extradata && !avctx->frame_number) {
 +    if (avctx->extradata && !s->parsed_extra) {
-         int ret = decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size);
-         if(*data_size) {
+         int ret = decode_chunks(avctx, picture, got_output, avctx->extradata, avctx->extradata_size);
++        if(*got_output) {
 +            av_log(avctx, AV_LOG_ERROR, "picture in extradata\n");
-             *data_size = 0;
++            *got_output = 0;
 +        }
 +        s->parsed_extra = 1;
          if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
              return ret;
      }