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>
This commit is contained in:
He Junyan 2021-07-06 13:38:16 +08:00 committed by GStreamer Marge Bot
parent f50089ec63
commit 1fa9f26a53

View file

@ -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;
}