mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 18:22:23 +00:00
ffdec: be more careful with DTS timestamp interpolation
Don't use -1 and 0 duration buffers to calculate next output timestamp as they are very likely wrong. Fixes #632877
This commit is contained in:
parent
07ce1d1906
commit
cc2a6e493b
1 changed files with 3 additions and 1 deletions
|
@ -1903,8 +1903,10 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
|
||||||
}
|
}
|
||||||
GST_BUFFER_DURATION (*outbuf) = out_duration;
|
GST_BUFFER_DURATION (*outbuf) = out_duration;
|
||||||
|
|
||||||
if (out_timestamp != -1 && out_duration != -1)
|
if (out_timestamp != -1 && out_duration != -1 && out_duration != 0)
|
||||||
ffmpegdec->next_out = out_timestamp + out_duration;
|
ffmpegdec->next_out = out_timestamp + out_duration;
|
||||||
|
else
|
||||||
|
ffmpegdec->next_out = -1;
|
||||||
|
|
||||||
/* palette is not part of raw video frame in gst and the size
|
/* palette is not part of raw video frame in gst and the size
|
||||||
* of the outgoing buffer needs to be adjusted accordingly */
|
* of the outgoing buffer needs to be adjusted accordingly */
|
||||||
|
|
Loading…
Reference in a new issue