aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-07-23 11:03:58 -0400
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-07-23 11:36:48 -0400
commitd04c5293ce88927ad359ca276e287bfa63c2329d (patch)
tree8fabdba6c736b133548cec60450f5fbe0a08bcaf
parent6c8fdfc5e51902c6011d450b7ddc94bd1fe1030e (diff)
downloadffmpeg-d04c5293ce88927ad359ca276e287bfa63c2329d.tar.gz
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>
-rw-r--r--libavcodec/v410dec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
index a6f236bd6d..d7660ee4fb 100644
--- a/libavcodec/v410dec.c
+++ b/libavcodec/v410dec.c
@@ -29,8 +29,12 @@ static av_cold int v410_decode_init(AVCodecContext *avctx)
avctx->bits_per_raw_sample = 10;
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();