mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
videodecoder: If there is no PTS at all, assume it starts from the segment start
This is to make the multifilesrc ! pngdec case work https://bugzilla.gnome.org/show_bug.cgi?id=688043
This commit is contained in:
parent
deb43fdd39
commit
c10311ba70
1 changed files with 6 additions and 4 deletions
|
@ -2290,10 +2290,12 @@ gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
|
||||||
|
|
||||||
if (frame->pts == GST_CLOCK_TIME_NONE) {
|
if (frame->pts == GST_CLOCK_TIME_NONE) {
|
||||||
/* Last ditch timestamp guess: Just add the duration to the previous
|
/* Last ditch timestamp guess: Just add the duration to the previous
|
||||||
* frame */
|
* frame. If it's the first frame, just use the segment start. */
|
||||||
if (priv->last_timestamp_out != GST_CLOCK_TIME_NONE &&
|
if (frame->duration != GST_CLOCK_TIME_NONE) {
|
||||||
frame->duration != GST_CLOCK_TIME_NONE) {
|
if (GST_CLOCK_TIME_IS_VALID (priv->last_timestamp_out))
|
||||||
frame->pts = priv->last_timestamp_out + frame->duration;
|
frame->pts = priv->last_timestamp_out + frame->duration;
|
||||||
|
else
|
||||||
|
frame->pts = decoder->output_segment.start;
|
||||||
GST_LOG_OBJECT (decoder,
|
GST_LOG_OBJECT (decoder,
|
||||||
"Guessing timestamp %" GST_TIME_FORMAT " for frame...",
|
"Guessing timestamp %" GST_TIME_FORMAT " for frame...",
|
||||||
GST_TIME_ARGS (frame->pts));
|
GST_TIME_ARGS (frame->pts));
|
||||||
|
|
Loading…
Reference in a new issue