[FFmpeg-devel] [PATCH] HAM6/HAM8 support for IFF demuxer/decoder

Mike Scheutzow scheutzow
Thu May 6 20:50:25 CEST 2010


Sebastian Vater wrote:
>>> Just a short question regarding this...is avcodec/decode_init called
>>> _before_ avformat/read_packet?
>>>     
>> That question doesn't make sense.  They are completely independent.
>>
>>   
> 
> Nope, because both call ff_cmap_read_palette, while ff_cmap_read_palette
> accesses avctx->priv_data, which contains the local structure for the
> transfered extradata.
> 
> In case decode_init is run after read_packet this structure hasn't been
> initialized yet, since that's done in decode_init.
> 

The FFmpeg demuxer might be used without the FFmpeg decoder, or the 
FFmpeg decoder might be used without the FFmpeg demuxer. You don't want 
to cause a segfault if a user chooses to use the libraries this way.


Mike Scheutzow



More information about the ffmpeg-devel mailing list