[Ffmpeg-devel] [PATCH] wrong use of ff_get_fourcc in mpjg.c
Måns Rullgård
mru
Wed Feb 7 13:08:10 CET 2007
Baptiste Coudurier said:
> Hi
>
> Michael Niedermayer wrote:
>> Hi
>>
>> On Wed, Feb 07, 2007 at 11:18:07AM +0100, Reimar Doeffinger wrote:
>>> Hello,
>>> attached patch fixes bug 739 by using the much more obvious to
>>> understand MKBETAG.
>>
>> ok
>>
>>
>>> I think this is not the first bug of this kind caused by this functions,
>>> indicating it that it is flawed in so far as it has non-obvious
>>> semantics, so may I suggest deprecating it?
>>
>> what about replacing all
>> MK*TAG and ff_get_fourcc by
>>
>> AV_RB32("ABCD") / AV_RL32("ABCD") ?
>>
>> assuming of course that the compiler can optimize this into similarely
>> simple code ...
>>
>
> I like MKTAG, which illustrates that we are looking for a tag rather
> than a serie of bytes. MKTAG("ABCD") would be nice though.
The trouble is that such constructs can't be used where a constant expression
is required, for instance in case labels. The MKTAG macros tend to be used
quite a lot in such places.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list