mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/h264_slice: Do not attempt to render into frames already output
Fixes: null pointer dereference
Fixes: 4698/clusterfuzz-testcase-minimized-5096956322906112
This testcase does not reproduce the issue before 03b82b3ab9
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
3c0a081a1e
commit
476665d4de
|
@ -1571,6 +1571,12 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
|
||||||
* one except for reference purposes. */
|
* one except for reference purposes. */
|
||||||
h->first_field = 1;
|
h->first_field = 1;
|
||||||
h->cur_pic_ptr = NULL;
|
h->cur_pic_ptr = NULL;
|
||||||
|
} else if (h->cur_pic_ptr->reference & DELAYED_PIC_REF) {
|
||||||
|
/* This frame was already output, we cannot draw into it
|
||||||
|
* anymore.
|
||||||
|
*/
|
||||||
|
h->first_field = 1;
|
||||||
|
h->cur_pic_ptr = NULL;
|
||||||
} else {
|
} else {
|
||||||
/* Second field in complementary pair */
|
/* Second field in complementary pair */
|
||||||
h->first_field = 0;
|
h->first_field = 0;
|
||||||
|
|
Loading…
Reference in New Issue