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
@ -2378,6 +2378,8 @@ gst_video_decoder_drop_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame)
|
||||
|
||||
timestamp = frame->pts;
|
||||
segment = &dec->output_segment;
|
||||
if (G_UNLIKELY (segment->format == GST_FORMAT_UNDEFINED))
|
||||
segment = &dec->input_segment;
|
||||
stream_time =
|
||||
gst_segment_to_stream_time (segment, GST_FORMAT_TIME, timestamp);
|
||||
qostime = gst_segment_to_running_time (segment, GST_FORMAT_TIME, timestamp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user