[FFmpeg-devel] [PATCH] Bugfix: decoding 8- and 24-bit FLAC files
Tue Jun 12 11:54:40 CEST 2007
M?ns Rullg?rd wrote:
> Benoit Fouet wrote:
>> Michael Donaghy wrote:
>>> Index: libavcodec/flac.c
>>> --- libavcodec/flac.c (revision 9283)
>>> +++ libavcodec/flac.c (working copy)
>>> @@ -684,8 +673,8 @@
>>> int a= s->decoded[i];\
>>> int b= s->decoded[i];\
>>> - *(samples++) = (left ) >> (16 - s->bps);\
>>> - *(samples++) = (right) >> (16 - s->bps);\
>>> + *(samples++) = (left << (24 - s->bps)) >> 8;\
>>> + *(samples++) = (right << (24 - s->bps)) >> 8;\
>> i think this code lacks paretheses
> I think it has too many.
ok, what i'd write would be:
*samples++ = ((left) << 24 - s->bps) >> 8;\
is that ok ?
Purple Labs S.A.
More information about the ffmpeg-devel