~ubuntu-branches/ubuntu/vivid/gst-libav1.0/vivid

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavcodec/indeo4.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge, Iain Lane, Sebastian Dröge
  • Date: 2014-02-09 11:42:06 UTC
  • mfrom: (21.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140209114206-jtvbwdvxi1v3klx7
Tags: 1.2.3-1
[ Iain Lane ]
* Drop ltmain-as-needed patch and do the same with dh_autoreconf
  --as-needed.

[ Sebastian Dröge ]
* New upstream bugfix release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
294
 
295
295
    band->is_empty = get_bits1(&ctx->gb);
296
296
    if (!band->is_empty) {
 
297
        int old_blk_size = band->blk_size;
297
298
        /* skip header size
298
299
         * If header size is not given, header size is 4 bytes. */
299
300
        if (get_bits1(&ctx->gb))
370
371
            band->scan = scan_index_to_tab[scan_indx];
371
372
 
372
373
            band->quant_mat = get_bits(&ctx->gb, 5);
373
 
            if (band->quant_mat == 31) {
374
 
                av_log(avctx, AV_LOG_ERROR, "Custom quant matrix encountered!\n");
375
 
                return AVERROR_INVALIDDATA;
376
 
            }
377
374
            if (band->quant_mat >= FF_ARRAY_ELEMS(quant_index_to_tab)) {
378
375
                av_log_ask_for_sample(avctx, "Quantization matrix %d",
379
376
                                      band->quant_mat);
 
377
 
 
378
                if (band->quant_mat == 31)
 
379
                    av_log(avctx, AV_LOG_ERROR,
 
380
                           "Custom quant matrix encountered!\n");
 
381
                else
 
382
                    av_log_ask_for_sample(avctx, "Quantization matrix %d",
 
383
                                          band->quant_mat);
 
384
                band->quant_mat = -1;
 
385
                return AVERROR_INVALIDDATA;
 
386
            }
 
387
        } else {
 
388
            if (old_blk_size != band->blk_size) {
 
389
                av_log(avctx, AV_LOG_ERROR,
 
390
                       "The band block size does not match the configuration "
 
391
                       "inherited\n");
 
392
                return AVERROR_INVALIDDATA;
 
393
            }
 
394
            if (band->quant_mat < 0) {
 
395
                av_log(avctx, AV_LOG_ERROR, "Invalid quant_mat inherited\n");
380
396
                return AVERROR_INVALIDDATA;
381
397
            }
382
398
        }