avcodec/h264: Clear delayed_pic on deallocation
Fixes use of freed memory
Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e8714f6f93
)
Conflicts:
libavcodec/h264.c
This commit is contained in:
@@ -1043,6 +1043,7 @@ static void free_tables(H264Context *h, int free_rbsp)
|
||||
av_freep(&h->visualization_buffer[i]);
|
||||
|
||||
if (free_rbsp) {
|
||||
memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
|
||||
for (i = 0; i < h->picture_count && !h->avctx->internal->is_copy; i++)
|
||||
free_picture(h, &h->DPB[i]);
|
||||
av_freep(&h->DPB);
|
||||
|
Reference in New Issue
Block a user