h264decoder: Fix invalid memory access
authorSeungha Yang <seungha@centricular.com>
Fri, 11 Mar 2022 10:32:59 +0000 (19:32 +0900)
committerSeungha Yang <seungha@centricular.com>
Fri, 11 Mar 2022 10:32:59 +0000 (19:32 +0900)
gst_h264_dpb_needs_bump() can be called with null picture
in case of live

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1928>

subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth264picture.c

index 8239b15..b793073 100644 (file)
@@ -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;
 }