[FFmpeg-devel] [PATCH] movenc.c: fix metadata writing.
Sat Mar 5 14:48:56 CET 2011
On Sat, Mar 05, 2011 at 02:42:10PM +0100, Nicolas George wrote:
> Le quintidi 15 vent?se, an CCXIX, Ronald S. Bultje a ?crit?:
> > What is the idiot thing that it does? Do you want me to cast to
> > unsigned inside the macro?
> Just casting to unsigned would break mot AVERROR_ macros, as they are
> defined as -MKTAG and expected to be signed, and not 2-complement.
Where would this actually cause an issue?
Anyway there are different possibilities (and it might be worth to
think about performance), however for example there is not issue
with signedness if changing it to:
#define MKTAG(a,b,c,d) (((a) & 0xff) | (((b) & 0xff) << 8) | (((c) & 0xff) << 16) | (((d) & 0xff) << 24))
Unless I miss something that would have avoided the issue...
More information about the ffmpeg-devel