[Ffmpeg-devel] [PATCH] remove special nuv wav tags
Måns Rullgård
mru
Sun Nov 5 22:52:10 CET 2006
Roberto Togni <rxt at rtogni.it> writes:
>> Are those two the only allowed codecs? Then something like this seems
>> much more appropriate:
>>
>> int tag = get_le32(pb);
>> switch(tag){
>> case MKTAG('R', 'A', 'W', 'A'):
>> ast->codec->codec_id = CODEC_ID_PCM_S16LE;
>> break;
>> case MKTAG('L', 'A', 'M', 'E'):
>> ast->codec->codec_id = CODEC_ID_MP3;
>> break;
>> }
>>
>> See, no need to involve RIFF tags at all. RIFF tags are *not* the
>> bloody center of the universe, even if mplayer appears to have been
>> written with that assumption.
>>
>> Also, setting AVCodecContext.codec_tag in nuv.c seems a little
>> questionable, given that most of the code treats it as RIFF codec tag,
>> which it is not in this case.
>>
>
> Having to modify a demuxer every time we need to support a new codec
> does not seem a better solution to me. With the current code, you just
> need to add a pair {codec_id, "tag"} to the tag list.
So make a new table at the top of nuv.c.
> Since the main argument seems to be "riff is for avi", what about do a
> svn move riff.c tags.c ?
NOOOOOOOOOOOOOO. The tables in riff.c are only valid for RIFF based
formats. Other formats *must* have their own tables.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list