summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-10-16 20:15:48 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-16 21:14:56 +0200
commit4c2d4e8700cd3db59bc11ab196c0002215cf601f (patch)
tree2ed264d004a53ea62ae048c7335ba198459bfcd1 /libavcodec/ffv1dec.c
parent8297f560cca286b4a5179556298fd96183c769e9 (diff)
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>
Diffstat (limited to 'libavcodec/ffv1dec.c')
-rw-r--r--libavcodec/ffv1dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index a8d5e33da9..c32f7178c5 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -408,6 +408,7 @@ static int decode_slice(AVCodecContext *c, void *arg)
if (ff_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;
}