[FFmpeg-devel] [RFC] possible API for opening external demuxer references

Gabriel Forté gforte
Thu Feb 28 14:31:31 CET 2008

On Wed, Feb 27, 2008 at 08:27:56PM +0100, Reimar D?ffinger wrote:
> On Wed, Feb 27, 2008 at 08:01:58PM +0100, Gabriel Fort? wrote:
> > the reading part is IMO even dirtier, as I'm forced to keep the current
> > pts/dts values for every stream, and find out before each
> > av_read_frame() which AVFormatContext I should use based on expected values.
> > ie. if aux's DTS <= main's DTS, then read from aux.
> Um, why don't you just buffer one AVPacket for each AVFormatContext and
> always return the one with the lower PTS in your read wrapper (and fill
> the empty buffer with a new packet)?

hm... I must admit I hadn't thought of it back then, but that might work
better indeed, thanks for the tip ;)

I wrote that code nearly two years ago and my knowledge and "common
sense" about libavformat was much more limited than it is now (hence the
dirty stuff).
I'm mainly looking at it again because some problems are resurfacing with it,
and I now hope to get rid of that half-baked solution.


Gabriel Fort? <gforte at wyplay.com>

More information about the ffmpeg-devel mailing list