mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
videodecoder: Gracefully handle missing data without prior input segment
Exit early in case the decoder has been resetted and hasn't received a new segment event yet. This was detected with netsim dropping buffers in a WebRTC pipeline. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8200>
This commit is contained in:
parent
7152d5c07a
commit
17e5491b60
1 changed files with 7 additions and 2 deletions
|
@ -1307,14 +1307,19 @@ caps_error:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Must be called holding the GST_VIDEO_DECODER_STREAM_LOCK */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_video_decoder_handle_missing_data_default (GstVideoDecoder *
|
gst_video_decoder_handle_missing_data_default (GstVideoDecoder * decoder,
|
||||||
decoder, GstClockTime timestamp, GstClockTime duration)
|
GstClockTime timestamp, GstClockTime duration)
|
||||||
{
|
{
|
||||||
GstVideoDecoderPrivate *priv;
|
GstVideoDecoderPrivate *priv;
|
||||||
|
|
||||||
priv = decoder->priv;
|
priv = decoder->priv;
|
||||||
|
|
||||||
|
/* Exit early in case the decoder has been resetted and hasn't received a new segment event yet. */
|
||||||
|
if (decoder->input_segment.format != GST_FORMAT_TIME)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (priv->automatic_request_sync_points) {
|
if (priv->automatic_request_sync_points) {
|
||||||
GstClockTime deadline =
|
GstClockTime deadline =
|
||||||
gst_segment_to_running_time (&decoder->input_segment, GST_FORMAT_TIME,
|
gst_segment_to_running_time (&decoder->input_segment, GST_FORMAT_TIME,
|
||||||
|
|
Loading…
Reference in a new issue