codecs: h264dec: Fix a error print of dpb_add.
authorHe Junyan <junyan.he@intel.com>
Sun, 25 Jul 2021 17:16:34 +0000 (01:16 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 28 Jul 2021 10:54:21 +0000 (10:54 +0000)
When the dpb is interlaced, the max size should be 2*dpb->max_num_frames,
correcting the error print info for that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2430>

gst-libs/gst/codecs/gsth264picture.c

index 14e7bfd8445e84dbb486a1832485185db54690c5..544e1d21962e4dd8f0c2e5a14e946fc2df6bbd32 100644 (file)
@@ -301,7 +301,7 @@ gst_h264_dpb_add (GstH264Dpb * dpb, GstH264Picture * picture)
 
   if (dpb->pic_list->len > dpb->max_num_frames * (dpb->interlaced + 1))
     GST_ERROR ("DPB size is %d, exceed the max size %d",
-        dpb->pic_list->len, dpb->max_num_frames);
+        dpb->pic_list->len, dpb->max_num_frames * (dpb->interlaced + 1));
 
   /* The IDR frame or mem_mgmt_5 */
   if (picture->pic_order_cnt == 0) {