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

Sebastian Vater cdgs.basty
Thu May 6 21:12:58 CEST 2010

Ronald S. Bultje a ?crit :
> Hi,
> On Thu, May 6, 2010 at 2:53 PM, Sebastian Vater
> <cdgs.basty at googlemail.com> wrote:
>> Mike Scheutzow a ?crit :
>>> 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.
>> Well, then it's probably the best way to duplicate the
>> ff_cmap_read_palette function, so it's also available in the demuxer
>> directly, what do you think?
> Sharing the code is OK. But the decoder shouldn't add stuff to the
> function that the demuxer doesn't need, create a new function instead.

Just to clarify, the piece of code causing the call from avformat in
iff_read_packet is:
    } else if (s->streams[0]->codec->codec_id == CODEC_ID_RAWVIDEO) {
        if(av_new_packet(pkt, iff->body_size + AVPALETTE_SIZE) < 0) {
            return AVERROR(ENOMEM);

        ret = ff_cmap_read_palette(st->codec, (uint32_t*)(pkt->data +
        if (ret < 0)
            return ret;
        st->codec->extradata_size = 0;

        ret = get_buffer(pb, pkt->data, iff->body_size);

In case, this changes anything (the codec seems already be available), I
will do an extra function. Please confirm if this is really needed!


Best regards,
                   :-) Basty/CDGS (-:

More information about the ffmpeg-devel mailing list