Merge commit '0358a099f8abe60230dc2e5bec59bfceb7d1be07' into release/1.1
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Jan 2014 15:37:42 +0000 (16:37 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Jan 2014 15:37:42 +0000 (16:37 +0100)
* commit '0358a099f8abe60230dc2e5bec59bfceb7d1be07':
  indeo4: Check the block size if reusing the band configuration
  ffv1: Assume bitdepth 0 means 8bit
  alsa-audio-dec: explicitly cast the delay to a signed int64
  matroskadec: pad EBML_BIN data.
  motionpixels: clip VLC codes.
  avidec: fix a memleak in the dv init code.

Conflicts:
libavcodec/ffv1dec.c
libavcodec/indeo4.c
libavdevice/alsa-audio-dec.c
libavformat/matroskadec.c

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

@@@ -385,22 -375,19 +386,29 @@@ static int decode_band_hdr(IVI45DecCont
                  av_log(avctx, AV_LOG_ERROR, "Custom quant matrix encountered!\n");
                  return AVERROR_INVALIDDATA;
              }
 -            if (band->quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) {
 +            if (quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) {
                  av_log_ask_for_sample(avctx, "Quantization matrix %d",
 -                                      band->quant_mat);
 +                                      quant_mat);
                  return AVERROR_INVALIDDATA;
              }
 +            band->quant_mat = quant_mat;
+         } else {
+             if (old_blk_size != band->blk_size) {
+                 av_log(avctx, AV_LOG_ERROR,
+                        "The band block size does not match the configuration "
+                        "inherited\n");
+                 return AVERROR_INVALIDDATA;
+             }
          }
 +        if (quant_index_to_tab[band->quant_mat] > 4 && band->blk_size == 4) {
 +            av_log(avctx, AV_LOG_ERROR, "Invalid quant matrix for 4x4 block encountered!\n");
 +            band->quant_mat = 0;
 +            return AVERROR_INVALIDDATA;
 +        }
 +        if (band->scan_size != band->blk_size) {
 +            av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n");
 +            return AVERROR_INVALIDDATA;
 +        }
  
          /* decode block huffman codebook */
          if (ff_ivi_dec_huff_desc(&ctx->gb, get_bits1(&ctx->gb), IVI_BLK_HUFF,
Simple merge