mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
videodecoder: Fix drop frame handling at startup
In the unlikely case that the decoder drops a frame before the first input frame is outputted, use the input segment (since it wasn't carried over to the output segment yet) https://bugzilla.gnome.org/show_bug.cgi?id=702502
This commit is contained in:
parent
bcc5ac5298
commit
65624afd8f
1 changed files with 2 additions and 0 deletions
|
@ -2378,6 +2378,8 @@ gst_video_decoder_drop_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame)
|
||||||
|
|
||||||
timestamp = frame->pts;
|
timestamp = frame->pts;
|
||||||
segment = &dec->output_segment;
|
segment = &dec->output_segment;
|
||||||
|
if (G_UNLIKELY (segment->format == GST_FORMAT_UNDEFINED))
|
||||||
|
segment = &dec->input_segment;
|
||||||
stream_time =
|
stream_time =
|
||||||
gst_segment_to_stream_time (segment, GST_FORMAT_TIME, timestamp);
|
gst_segment_to_stream_time (segment, GST_FORMAT_TIME, timestamp);
|
||||||
qostime = gst_segment_to_running_time (segment, GST_FORMAT_TIME, timestamp);
|
qostime = gst_segment_to_running_time (segment, GST_FORMAT_TIME, timestamp);
|
||||||
|
|
Loading…
Reference in a new issue