summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2021-07-06 14:06:24 +0800
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-07-06 14:33:21 +0000
commit078b2699e7b741bb5c3dcac843573fd1ccea0195 (patch)
treecb72ab2554bfef3be02ad9155c105feb497c1a5d /gst-libs
parent1fa9f26a5318be10b764759afc78b34766904302 (diff)
downloadgstreamer-plugins-bad-078b2699e7b741bb5c3dcac843573fd1ccea0195.tar.gz
codecs: h265dec: Disable the POC order warning for negative POC.
There may be leading frames after the IRAP frames, which has negative POC. This kind of frames are allowed and they will be displayed before the IRAP 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/gsth265decoder.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gst-libs/gst/codecs/gsth265decoder.c b/gst-libs/gst/codecs/gsth265decoder.c
index 5541b2dec..884a82851 100644
--- a/gst-libs/gst/codecs/gsth265decoder.c
+++ b/gst-libs/gst/codecs/gsth265decoder.c
@@ -178,6 +178,8 @@ gst_h265_decoder_init (GstH265Decoder * self)
self->priv = priv = gst_h265_decoder_get_instance_private (self);
+ priv->last_output_poc = G_MININT32;
+
priv->ref_pic_list_tmp = g_array_sized_new (FALSE, TRUE,
sizeof (GstH265Picture *), 32);
priv->ref_pic_list0 = g_array_sized_new (FALSE, TRUE,
@@ -1507,7 +1509,7 @@ gst_h265_decoder_clear_dpb (GstH265Decoder * self, gboolean flush)
}
gst_h265_dpb_clear (priv->dpb);
- priv->last_output_poc = 0;
+ priv->last_output_poc = G_MININT32;
}
static gboolean
@@ -1520,7 +1522,7 @@ gst_h265_decoder_drain_internal (GstH265Decoder * self)
gst_h265_decoder_do_output_picture (self, picture);
gst_h265_dpb_clear (priv->dpb);
- priv->last_output_poc = 0;
+ priv->last_output_poc = G_MININT32;
return TRUE;
}
@@ -1558,7 +1560,7 @@ gst_h265_decoder_dpb_init (GstH265Decoder * self, const GstH265Slice * slice,
"there are still %d pictures in the dpb, last output poc is %d",
gst_h265_dpb_get_size (priv->dpb), priv->last_output_poc);
} else {
- priv->last_output_poc = 0;
+ priv->last_output_poc = G_MININT32;
}
}
} else {