Browse Source

v410dec: Implement explode mode support

Try and decode broken files, but still fail if explode
mode is enabled.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
tags/n1.0
Derek Buitenhuis 13 years ago
parent
commit
d04c5293ce
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      libavcodec/v410dec.c

+ 6
- 2
libavcodec/v410dec.c View File

@@ -29,8 +29,12 @@ static av_cold int v410_decode_init(AVCodecContext *avctx)
avctx->bits_per_raw_sample = 10; avctx->bits_per_raw_sample = 10;


if (avctx->width & 1) { if (avctx->width & 1) {
av_log(avctx, AV_LOG_ERROR, "v410 requires even width.\n");
return AVERROR_INVALIDDATA;
if (avctx->err_recognition & AV_EF_EXPLODE) {
av_log(avctx, AV_LOG_ERROR, "v410 requires width to be even, continuing anyway.\n");
return AVERROR_INVALIDDATA;
} else {
av_log(avctx, AV_LOG_WARNING, "v410 requires width to be even.\n");
}
} }


avctx->coded_frame = avcodec_alloc_frame(); avctx->coded_frame = avcodec_alloc_frame();


Loading…
Cancel
Save