diff options
author | He Junyan <junyan.he@intel.com> | 2021-07-06 13:38:16 +0800 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-07-06 14:33:21 +0000 |
commit | 1fa9f26a5318be10b764759afc78b34766904302 (patch) | |
tree | 37d1605673f30b988195b17aac7cb03857453b2f /gst-libs | |
parent | f50089ec63a86b65ea88a06a718555b77d12c8fa (diff) | |
download | gstreamer-plugins-bad-1fa9f26a5318be10b764759afc78b34766904302.tar.gz |
codecs: h264dec: Disable the POC order warning for negative POC.
There may be leading frames after the IDR frame, which has negative
POC. This kind of frames are allowed and they will be displayed before
the IDR frame. So the warning should not be triggered for them. Init
the last_output_poc to G_MININT32 can avoid this.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2380>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/codecs/gsth264decoder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/codecs/gsth264decoder.c b/gst-libs/gst/codecs/gsth264decoder.c index 554ab1e03..938f2b947 100644 --- a/gst-libs/gst/codecs/gsth264decoder.c +++ b/gst-libs/gst/codecs/gsth264decoder.c @@ -235,6 +235,8 @@ gst_h264_decoder_init (GstH264Decoder * self) self->priv = priv = gst_h264_decoder_get_instance_private (self); + priv->last_output_poc = G_MININT32; + priv->ref_pic_list_p0 = g_array_sized_new (FALSE, TRUE, sizeof (GstH264Picture *), 32); g_array_set_clear_func (priv->ref_pic_list_p0, @@ -372,7 +374,7 @@ gst_h264_decoder_clear_dpb (GstH264Decoder * self, gboolean flush) gst_queue_array_clear (priv->output_queue); gst_h264_decoder_clear_ref_pic_lists (self); gst_h264_dpb_clear (priv->dpb); - priv->last_output_poc = 0; + priv->last_output_poc = G_MININT32; } static gboolean @@ -1643,7 +1645,7 @@ gst_h264_decoder_drain_internal (GstH264Decoder * self) gst_h264_decoder_drain_output_queue (self, 0); gst_h264_dpb_clear (priv->dpb); - priv->last_output_poc = 0; + priv->last_output_poc = G_MININT32; return TRUE; } |