[FFmpeg-devel] [PATCH] avformat/mpegts: also ignore new stream in PMT while seeking

Yuusei KUWANA kuwana at kumama.org
Tue Apr 17 14:48:23 EEST 2018


avformat/mpegts: also ignore new stream in PMT while seeking

Signed-off-by: Yuusei KUWANA <kuwana at kumama.org>
---
 libavformat/mpegts.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 37a6aa8..bd75494 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2043,6 +2043,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
         pid &= 0x1fff;
         if (pid == ts->current_pid)
             goto out;
+        if (ts->skip_changes)
+            goto out;
 
         /* now create stream */
         if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES) {
@@ -2066,6 +2068,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
             }
         } else {
             int idx = ff_find_stream_index(ts->stream, pid);
+            if (ts->skip_changes)
+                goto out;
             if (idx >= 0) {
                 st = ts->stream->streams[idx];
             } else {
-- 
2.7.4



More information about the ffmpeg-devel mailing list