[FFmpeg-cvslog] avcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header decoding fails for other reasons

Michael Niedermayer git at videolan.org
Thu Nov 19 11:27:54 CET 2015


ffmpeg | branch: release/2.6 | Michael Niedermayer <michael at niedermayer.cc> | Fri Oct 16 20:15:48 2015 +0200| [2da580a6bbdc326a681b8d8bc404d71987e2d03a] | committer: Michael Niedermayer

avcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header decoding fails for other reasons

Fixes Ticket4931

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 4c2d4e8700cd3db59bc11ab196c0002215cf601f)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/ffv1dec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 694b63c..4b98c52 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -409,6 +409,7 @@ static int decode_slice(AVCodecContext *c, void *arg)
         if (ffv1_init_slice_state(f, fs) < 0)
             return AVERROR(ENOMEM);
         if (decode_slice_header(f, fs) < 0) {
+            fs->slice_x = fs->slice_y = fs->slice_height = fs->slice_width = 0;
             fs->slice_damaged = 1;
             return AVERROR_INVALIDDATA;
         }



More information about the ffmpeg-cvslog mailing list