Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Jan 2012 23:32:38 +0000 (00:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Jan 2012 23:32:38 +0000 (00:32 +0100)
* qatar/master:
  bfi: Use bytestream2 functions to prevent buffer overreads.
  dpcm: Fix invalid writes
  utvideo: frame multithreading.
  vorbis: An additional defense in the Vorbis codec.
  vorbisdec: Fix decoding bug with channel handling

Conflicts:
libavcodec/dpcm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/bfi.c
libavcodec/dpcm.c
libavcodec/utvideo.c

index 2aa1a4cb658835e1cf0e3dcef2eca4d5270b7df4,542ba5421c879f6abcfd82a9b290764d873c6d4b..0a7324a297d87cef77c93a0d8b7205a850bc1d15
@@@ -92,11 -91,9 +94,11 @@@ static int bfi_decode_frame(AVCodecCont
      } else {
          bfi->frame.pict_type = AV_PICTURE_TYPE_P;
          bfi->frame.key_frame = 0;
 +        bfi->frame.palette_has_changed = 0;
 +        memcpy(bfi->frame.data[1], bfi->pal, sizeof(bfi->pal));
      }
  
-     buf += 4; // Unpacked size, not required.
+     bytestream2_skip(&g, 4); // Unpacked size, not required.
  
      while (dst != frame_end) {
          static const uint8_t lentab[4] = { 0, 2, 0, 1 };
Simple merge
index 906a61f9f8ee9a82962d2a4cf767b7932652df14,89854c277c4b6ca27ec25b09c4cec6f9d3750142..a45f13fa54e6c03d0ba2f2fe309dc4d93e4f4e5d
@@@ -366,11 -367,11 +367,11 @@@ static int decode_frame(AVCodecContext 
      int ret;
  
      if (c->pic.data[0])
-         avctx->release_buffer(avctx, &c->pic);
+         ff_thread_release_buffer(avctx, &c->pic);
  
 -    c->pic.reference = 1;
 +    c->pic.reference = 3;
      c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
-     if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0) {
+     if ((ret = ff_thread_get_buffer(avctx, &c->pic)) < 0) {
          av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
          return ret;
      }