nvcodec: nvh264sldec: Consider additional render delay DPB pictures
authorSeungha Yang <seungha@centricular.com>
Sun, 3 Oct 2021 08:41:40 +0000 (17:41 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 4 Oct 2021 08:04:00 +0000 (08:04 +0000)
At least additional 4 pictures are required

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

subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264dec.c

index f98bd4e..17f5875 100644 (file)
@@ -413,8 +413,8 @@ gst_nv_h264_dec_new_sequence (GstH264Decoder * decoder, const GstH264SPS * sps,
     /* FIXME: add support cudaVideoCodec_H264_SVC and cudaVideoCodec_H264_MVC */
     if (!gst_nv_decoder_configure (self->decoder,
             cudaVideoCodec_H264, &info, self->coded_width, self->coded_height,
-            /* Additional 2 buffers for margin */
-            max_dpb_size + 2)) {
+            /* Additional 4 buffers for render delay */
+            max_dpb_size + 4)) {
       GST_ERROR_OBJECT (self, "Failed to configure decoder");
       return FALSE;
     }