avcodec/ffv1dec: Fail earlier if prior context is corrupted
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 4df91e2215a79546a7f08faa457c05182646b302) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d12e316dbd
commit
03758674e2
@ -304,8 +304,11 @@ static int decode_slice(AVCodecContext *c, void *arg)
|
|||||||
}
|
}
|
||||||
if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0)
|
if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (f->cur->key_frame || fs->slice_reset_contexts)
|
if (f->cur->key_frame || fs->slice_reset_contexts) {
|
||||||
ff_ffv1_clear_slice_state(f, fs);
|
ff_ffv1_clear_slice_state(f, fs);
|
||||||
|
} else if (fs->slice_damaged) {
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
width = fs->slice_width;
|
width = fs->slice_width;
|
||||||
height = fs->slice_height;
|
height = fs->slice_height;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user