mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
ffdec: disable interpolation when dropping frames
When we are dropping frames because of QoS disable the DTS interpolation because we won't be able to update the timestamps and end up setting the wrong timestamps. Instead, simply use the timestamps from ffmpeg.
This commit is contained in:
parent
df248a7aa6
commit
46bf3b92d0
1 changed files with 8 additions and 0 deletions
|
@ -1683,6 +1683,14 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
|
|||
if (len < 0 && (mode_switch || ffmpegdec->context->hurry_up))
|
||||
len = 0;
|
||||
|
||||
if (len > 0 && have_data <= 0 && (mode_switch
|
||||
|| ffmpegdec->context->hurry_up)) {
|
||||
/* we consumed some bytes but nothing decoded and we are skipping frames,
|
||||
* disable the interpollation of DTS timestamps */
|
||||
ffmpegdec->ts_is_dts = FALSE;
|
||||
ffmpegdec->last_out = -1;
|
||||
}
|
||||
|
||||
/* no data, we're done */
|
||||
if (len < 0 || have_data <= 0)
|
||||
goto beach;
|
||||
|
|
Loading…
Reference in a new issue