[Ffmpeg-devel] avformat/mpegts reads too much data for lowbitratestreams

Måns Rullgård mru
Thu Jun 9 15:12:04 CEST 2005

Kenneth Aafl?y <kenneth at aafloy.net> writes:

> torsdag 9. juni 2005, 14:23, skrev M?ns Rullg?rd:
>> Kenneth Aafl?y <kenneth at aafloy.net> writes:
>> > Currently the pat/pmt/sdt filters are closed after the scan. Since
>> > the services in a ts stream could stop transmission at any time,
>> > especially when there are multiple services in a transport, wouldn't
>> > it be better to keep them open and detect if pids are added/removed?
>> > Then somehow pass this to the user by some generic callback
>> > interface? IIRC the mythtv devs added something like this, but I
>> > belive they didn't touch the pat/pmt/sdt filters..
>> That would all be nice and dandy, but libavformat currently has no
>> provisions to pass such data to the application.  What could be done,
>> however, is to monitor the PAT/PMT for changes to the PIDs used by the
>> selected program, and adjust accordingly.  Yes, broadcasters do change
>> the PIDs from time to time, and some do it quite frequently.
> How do you tell the user that an AVStream is not active anymore?

You stop returning packets from it.  If all the streams go away, you
do whatever the method is to signal end of file, which I can't recall
at the moment.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list