[FFmpeg-devel] [PATCH] h264: rbsp de-escape and data partitioning..
Guillaume Poirier
gpoirier
Wed Jun 20 14:52:01 CEST 2007
Hi,
M?ns Rullg?rd wrote:
> Guillaume Poirier wrote:
>> M?ns Rullg?rd wrote:
>>> Andreas ?man wrote:
>>>> Benoit Fouet wrote:
>>>>> Andreas ?man wrote:
>>>>>> - h->rbsp_buffer= av_fast_realloc(h->rbsp_buffer, &h->rbsp_buffer_size,
>>>>>> length);
>>>>>> - dst= h->rbsp_buffer;
>>>>>> + bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0; // use second escape
>>>>>> buffer for inter data
>>>>>>
>>>>> i think the "? 1 : 0" is not needed
>>>> They are not indeed, but i tend to keep such things in for
>>>> clarity
>>> I keep them out for clarity. If you don't think it's clear without them,
>>> go back and read your K&R once more.
>>>
>> This is NOT pedantic valid C:
>>
>> try to compile:
>> ----------%<------test.c------
>> int func() {
>> return 1?:0;
>> }
>> ---------->%------------------
>
> Nobody suggested using that silly gcc-ism. The debate is over "foo == bar"
> vs "foo == bar? 1: 0". Both evaluate to exactly the same thing, the former
> is less cluttered.
Ah, Ok, and I agree with this. This discussion was a bit unclear, good
thing that you cleared this up.
Guillaume
More information about the ffmpeg-devel
mailing list