summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-25 03:22:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-25 03:23:25 +0100
commit7296716e355c73650033b57bafe44063d3670117 (patch)
tree1501e3bb04e0c405e42b4d6c4d76c137c58f12e8 /libavcodec/h264.c
parent390c57781fc6b99442ffcf03c50f0cc026610488 (diff)
avcodec/h264: Clear last_pic_for_ec on seeks and reinits
Fixes out of array read Fixes: asan_heap-oob_2ff30d2_3479_cov_3803648058_src13_hrc7_525_420_2.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index c10bd8149f..a3230980b3 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1084,6 +1084,8 @@ void ff_h264_flush_change(H264Context *h)
h->delayed_pic[j++] = h->delayed_pic[i];
h->delayed_pic[j] = NULL;
}
+ ff_h264_unref_picture(h, &h->last_pic_for_ec);
+
h->first_field = 0;
ff_h264_reset_sei(h);
h->recovery_frame = -1;