You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
@@ -408,6 +408,7 @@ static int decode_slice(AVCodecContext *c, void *arg)
|
|||||||
if (ff_ffv1_init_slice_state(f, fs) < 0)
|
if (ff_ffv1_init_slice_state(f, fs) < 0)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
if (decode_slice_header(f, fs) < 0) {
|
if (decode_slice_header(f, fs) < 0) {
|
||||||
|
fs->slice_x = fs->slice_y = fs->slice_height = fs->slice_width = 0;
|
||||||
fs->slice_damaged = 1;
|
fs->slice_damaged = 1;
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user