[FFmpeg-devel] [PATCH] movenc.c: fix metadata writing.

Ronald S. Bultje rsbultje
Sat Mar 5 14:39:35 CET 2011


Hi Reimar,

On Sat, Mar 5, 2011 at 7:59 AM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Sat, Mar 05, 2011 at 06:52:00AM -0500, Ronald S. Bultje wrote:
>> On Sat, Mar 5, 2011 at 6:16 AM, Reimar D?ffinger
>> <Reimar.Doeffinger at gmx.de> wrote:
>> > On Fri, Mar 04, 2011 at 03:03:35PM -0500, Ronald S. Bultje wrote:
>> >> On Fri, Mar 4, 2011 at 2:05 PM, Reimar D?ffinger
>> >> <Reimar.Doeffinger at gmx.de> wrote:
>> >> > Fixing MKTAG still would be a rather good idea...
>> >>
>> >> I'm not sure if MKTAG() is broken. It doesn't specify signedness or
>> >> range of the input characters.
>> >
>> > Can you think of even a single case where the current behaviour
>> > makes even the slightest bit of sense?
>> > For me the answer is no, and thus it is broken.
>>
>> Are we still talking about MKTAG?
>>
>> I think MKTAG does the right thing. You generally call it with hex
>> values (0x80, which is positive) or ascii chars ('c', which is
>> positive), and in both cases the result is valid. The only case where
>> the result is invalid is when you literally feed it wrong input, e.g.
>> -1. But that's not really MKTAG's fault, is it? It could certainly be
>> made more dummy-proof, but again, is that really MKTAG's fault?
>
> Failing for no good reason at all is just idiotic, and code that
> does idiotic things for no good reason is wrong.

What is the idiot thing that it does? Do you want me to cast to
unsigned inside the macro?

Ronald



More information about the ffmpeg-devel mailing list