[vlc-devel] [PATCH] avformat: use avcodec codec_tag as original fourcc

Daniel Verkamp daniel at drv.nu
Tue Jan 21 07:12:22 CET 2014


On Mon, Jan 20, 2014 at 11:02 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> On Mon, 20 Jan 2014 23:00:03 -0700, Daniel Verkamp <daniel at drv.nu> wrote:
>> Fixes Bink video playback.
>
> The original FOURCC is an indicative value. Something is wrong if setting
> it fixes a functional bug.

The Bink video decoder in libavcodec relies on the fourcc to determine
the version of the codec, and that information is not provided in any
other way (it's not present in the actual codec bitstream or in
extradata).  It appears the Smacker decoder relies on the fourcc in a
similar way.

I agree that this is not optimal. Arguably, avformat should put this
sort of information in extradata and avcodec should look for it there
(perhaps falling back to codec_tag if not found for backwards
compatibility).  I will prepare a patch for ffmpeg to implement that,
but I don't believe this patch should cause any problems (in fact, it
seems more correct from my understanding of i_original_fourcc).

Thanks,
-- Daniel Verkamp



More information about the vlc-devel mailing list