[FFmpeg-cvslog] avcodec/mpeg12dec: forward errors when EXPLODE is set

Michael Niedermayer git at videolan.org
Wed Oct 30 02:14:59 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 30 02:06:32 2013 +0100| [e1848aa469b7fc7f65df7656593ce382923e7371] | committer: Michael Niedermayer

avcodec/mpeg12dec: forward errors when EXPLODE is set

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e1848aa469b7fc7f65df7656593ce382923e7371
---

 libavcodec/mpeg12dec.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 82b503d..6b6c03e 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);
         }
 



More information about the ffmpeg-cvslog mailing list