From 3694045a54970571f15ad00fc341f49f46fa3b19 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 11 Mar 2022 19:32:59 +0900 Subject: [PATCH] h264decoder: Fix invalid memory access gst_h264_dpb_needs_bump() can be called with null picture in case of live Part-of: --- .../gst-plugins-bad/gst-libs/gst/codecs/gsth264picture.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264picture.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264picture.c index 8239b1575d..b79307391a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264picture.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264picture.c @@ -855,8 +855,10 @@ normal_bump: return TRUE; } - GST_TRACE ("No empty frame buffer, but lowest poc %d > current poc %d," - " no need bumping.", lowest_poc, to_insert->pic_order_cnt); + if (to_insert) { + GST_TRACE ("No empty frame buffer, but lowest poc %d > current poc %d," + " no need bumping.", lowest_poc, to_insert->pic_order_cnt); + } return FALSE; }