mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
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>
This commit is contained in:
parent
fd93c1ac19
commit
e0811f890f
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue