[FFmpeg-devel] MPEGTS multiple PMT with the same PID

Stephen D'Angelo SDAngelo
Tue Nov 23 20:56:53 CET 2010


Some transport streams have multiple PMT with the same PID.  Currently,
after the PMT is read from a particular PID, the filter is closed (at
the end of pmt_cb), resulting in only the first PMT with that PID being
read.  Removing the call to "mpegts_close_filter" at the end of pmt_cb
allows all of the PMT to be read in these streams.

This also results in the PMT for a program constantly being read.  I do
not believe this should have any adverse effects since the PAT and SDT
section filters are kept open for the duration of demuxing as well.  If
it is not desirable to keep the PMT section filter open, the filter
could be closed once all of the PMT on that PID have been read (based on
the data read in the PAT).

Index: libavformat/mpegts.c
--- libavformat/mpegts.c        (revision 25815)
+++ libavformat/mpegts.c        (working copy)
@@ -1083,8 +1083,6 @@
         p = desc_list_end;

-    /* all parameters are there */
-    mpegts_close_filter(ts, filter);

Thank you,

More information about the ffmpeg-devel mailing list