mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
mpegpsdemux: in seeking use a factor for SCR interpolation
Fixes seeking on clips where PTS are unalignded with SCR.
This commit is contained in:
parent
d557572e66
commit
7fa795a725
1 changed files with 6 additions and 0 deletions
|
@ -1037,6 +1037,12 @@ gst_flups_demux_do_seek (GstFluPSDemux * demux, GstSegment * seeksegment)
|
|||
guint64 scr_rate_n = demux->last_scr_offset - demux->first_scr_offset;
|
||||
guint64 scr_rate_d = demux->last_scr - demux->first_scr;
|
||||
|
||||
/* In some clips the PTS values are completely unaligned with SCR values.
|
||||
* To improve the seek in that situation we apply a factor considering the
|
||||
* relationship between last PTS and last SCR */
|
||||
if (demux->last_scr > demux->last_pts)
|
||||
scr = gst_util_uint64_scale (scr, demux->last_scr, demux->last_pts);
|
||||
|
||||
scr = MIN (demux->last_scr, scr);
|
||||
scr = MAX (demux->first_scr, scr);
|
||||
fscr = scr;
|
||||
|
|
Loading…
Reference in a new issue