mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
videodecoder: request sync-points regularly on error
If we are not receiving a sync-point for a very long time, we need to keep asking for them. The request-sync-point logic keeps track of how many keyunitrequests we are allowed to send, but that would not matter if we don't keep asking. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/930>
This commit is contained in:
parent
dc30676002
commit
6d4d4edfcc
1 changed files with 7 additions and 4 deletions
|
@ -3921,6 +3921,9 @@ gst_video_decoder_decode_frame (GstVideoDecoder * decoder,
|
|||
frame->pts = GST_BUFFER_PTS (frame->input_buffer);
|
||||
frame->dts = GST_BUFFER_DTS (frame->input_buffer);
|
||||
frame->duration = GST_BUFFER_DURATION (frame->input_buffer);
|
||||
frame->deadline =
|
||||
gst_segment_to_running_time (&decoder->input_segment, GST_FORMAT_TIME,
|
||||
frame->pts);
|
||||
|
||||
/* For keyframes, PTS = DTS + constant_offset, usually 0 to 3 frame
|
||||
* durations. */
|
||||
|
@ -3960,6 +3963,10 @@ gst_video_decoder_decode_frame (GstVideoDecoder * decoder,
|
|||
GST_WARNING_OBJECT (decoder,
|
||||
"Subclass requires a sync point but we didn't receive one yet, discarding input");
|
||||
GST_OBJECT_UNLOCK (decoder);
|
||||
if (priv->automatic_request_sync_points) {
|
||||
gst_video_decoder_request_sync_point (decoder, frame,
|
||||
priv->automatic_request_sync_point_flags);
|
||||
}
|
||||
gst_video_decoder_release_frame (decoder, frame);
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
@ -3992,10 +3999,6 @@ gst_video_decoder_decode_frame (GstVideoDecoder * decoder,
|
|||
"possible internal leaking?", priv->frames.length);
|
||||
}
|
||||
|
||||
frame->deadline =
|
||||
gst_segment_to_running_time (&decoder->input_segment, GST_FORMAT_TIME,
|
||||
frame->pts);
|
||||
|
||||
/* do something with frame */
|
||||
ret = decoder_class->handle_frame (decoder, frame);
|
||||
if (ret != GST_FLOW_OK)
|
||||
|
|
Loading…
Reference in a new issue