[FFmpeg-devel] [PATCH] Add a priv_data pointer to AVFormatParameters
Wed Oct 3 14:55:41 CEST 2007
On Wed, Oct 03, 2007 at 01:50:38PM +0100, Andy Parkins wrote:
> Here's the problem: you have a customised AVInputFormat, set up to call
> your own functions - not ffmpeg's. You register it and make a call to
> av_open_input_file() with the appropriate parameter pointing at your custom
> You want your custom read_header() handler to be passed some parameters
> that are specific to your input format. You can't use
> AVFormatContext::priv_data because av_open_input_file() zeroes and
> reallocates that before calling any of the AVInputFormat members.
> AVFormatParameters _is_ preserved through to the AVInputFormat::read_header()
> call, but doesn't have any members that match the parameters you want to
> The solution is this patch; we add a priv_data pointer to
> AVFormatParameters. AVFormatParameters is created filled with NUL bytes
> by default so if the user chooses not to supply priv_data, the custom
> read_header() will receive a NULL priv_data pointer.
> If the user _does_ want to pass some custom options to their custom
> read_header() they can make a AVFormatParameters structure and pass
> whatever they want through by setting priv_data.
the user should submit their "custom" demuxer here for inclusion in svn
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel