[FFmpeg-soc] Safe to use AVPacket::priv for pointing to AVFormatContext when using playlist?

Geza Kovacs gkovacs at MIT.EDU
Fri Jun 12 09:52:17 CEST 2009


Hi all,

Since (in ffplay) the decode_thread for audio and video lags the packet
buffering thread, in the case when different packets were read by
different demuxers and need to be decoded using different decoders (ie
h264/aac in mp4 followed by theora/vorbis in ogg in a playlist), it
appears it's necessary to keep track of the AVFormatContext which read
that packet in order to determine the decoder to use for that particular
packet. Thus I'd like to store said pointer somewhere accessible to the
decoder thread, and associated with each packet.

Since AVPacket::priv appears to be used only by mmap_read_frame() and
mmap_release_buffer(), which is only used by Video4Linux, is it safe to
use that variable for storing the pointer to AVFormatContext or should I
create a new variable in AVPacket for this (which to my understanding
would break ABI compatibility with older versions)?

Thanks,
Geza Kovacs


More information about the FFmpeg-soc mailing list