diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-16 20:15:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-19 03:51:38 +0100 |
commit | 2da580a6bbdc326a681b8d8bc404d71987e2d03a (patch) | |
tree | 38f72846ecf1b432557cee1ac189391d018d2299 | |
parent | 289e74d72dbdcd82f5c3f3e630ac9c7bebf1283b (diff) | |
download | ffmpeg-2da580a6bbdc326a681b8d8bc404d71987e2d03a.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 4c2d4e8700cd3db59bc11ab196c0002215cf601f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ffv1dec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 694b63c7b9..4b98c52d5e 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; } |