mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
mpegtsdemux: Reset stream->last_time when flushing.
This fixes naive seeking a tiny bit (by basically hinting at _data_cb that it shouldn't expect the incoming buffers to be the ones just after the previous ones). Without this, seeking by more than 10mins forward would just end up in an endless loop.
This commit is contained in:
parent
7057f285cc
commit
ddcd0e60b1
1 changed files with 10 additions and 0 deletions
|
@ -2543,6 +2543,7 @@ gst_mpegts_demux_src_event (GstPad * pad, GstEvent * event)
|
|||
static void
|
||||
gst_mpegts_demux_flush (GstMpegTSDemux * demux, gboolean discard)
|
||||
{
|
||||
gint i;
|
||||
GstMpegTSStream *PCR_stream;
|
||||
GstMpegTSStream *PMT_stream;
|
||||
|
||||
|
@ -2568,6 +2569,15 @@ gst_mpegts_demux_flush (GstMpegTSDemux * demux, gboolean discard)
|
|||
|
||||
PCR_stream->last_PCR = -1;
|
||||
|
||||
/* Reset last time of all streams */
|
||||
for (i = 0; i < MPEGTS_MAX_PID + 1; i++) {
|
||||
GstMpegTSStream *stream = demux->streams[i];
|
||||
|
||||
if (stream)
|
||||
stream->last_time = 0;
|
||||
}
|
||||
|
||||
|
||||
beach:
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue