summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-30 02:06:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-10-30 02:08:34 +0100
commite1848aa469b7fc7f65df7656593ce382923e7371 (patch)
tree10ed69e1bc557523c821ee9b7f95213fee70da0e /libavcodec/mpeg12dec.c
parentf86387b6c2b11650cb9d5a8fd886be76e48c665b (diff)
avcodec/mpeg12dec: forward errors when EXPLODE is set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 82b503d717..6b6c03e801 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2185,6 +2185,10 @@ static int decode_chunks(AVCodecContext *avctx,
}
}
s2->pict_type = 0;
+
+ if (avctx->err_recognition & AV_EF_EXPLODE && s2->er.error_count)
+ return AVERROR_INVALIDDATA;
+
return FFMAX(0, buf_ptr - buf - s2->parse_context.last_index);
}