aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-10-16 20:15:48 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-06 12:40:49 +0100
commita3753ba10df1911c971aa01ec80b12f3f4b46ae4 (patch)
treea34ae260e62c8340b959a825ee9402595757db4f /libavcodec
parenteaf03fa8304c7a9ace12f203811641efd64c0c0f (diff)
downloadffmpeg-a3753ba10df1911c971aa01ec80b12f3f4b46ae4.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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 0ca58f4eb6..ebdafd1f8c 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;
}