diff options
author | Havard Graff <havard@pexip.com> | 2021-09-10 16:12:51 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-09-16 17:00:14 +0300 |
commit | e0811f890f402b48cd5a7d901caa7f38d50848bf (patch) | |
tree | 91ae3ec51bfc8d7b96d530dd7dba62ccb5095aee | |
parent | fd93c1ac197fc98ed896afab7414b91b383039d2 (diff) | |
download | gstreamer-plugins-base-e0811f890f402b48cd5a7d901caa7f38d50848bf.tar.gz |
videodecoder: Fix min-force-key-unit-interval logic and logging
The new keyframe is needed when the deadline of the buffer has exeeded
the waiting time, not while it is within it.
Also, since we look at the deadline of the frame, log that instead of PTS.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1278>
-rw-r--r-- | gst-libs/gst/video/gstvideodecoder.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index cf75ff1ec..8684e3758 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -5164,18 +5164,18 @@ gst_video_decoder_request_sync_point (GstVideoDecoder * dec, (priv->min_force_key_unit_interval != GST_CLOCK_TIME_NONE && (priv->last_force_key_unit_time == GST_CLOCK_TIME_NONE || (priv->last_force_key_unit_time + - priv->min_force_key_unit_interval >= frame->deadline)))) { + priv->min_force_key_unit_interval <= frame->deadline)))) { GST_DEBUG_OBJECT (dec, - "Requesting a new key-unit for frame with PTS %" GST_TIME_FORMAT, - GST_TIME_ARGS (frame->pts)); + "Requesting a new key-unit for frame with deadline %" GST_TIME_FORMAT, + GST_TIME_ARGS (frame->deadline)); fku = gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE, FALSE, 0); priv->last_force_key_unit_time = frame->deadline; } else { GST_DEBUG_OBJECT (dec, - "Can't request a new key-unit for frame with PTS %" GST_TIME_FORMAT, - GST_TIME_ARGS (frame->pts)); + "Can't request a new key-unit for frame with deadline %" + GST_TIME_FORMAT, GST_TIME_ARGS (frame->deadline)); } priv->request_sync_point_flags |= flags; /* We don't know yet the frame number of the sync point so set it to a |