[FFmpeg-cvslog] r9286 - trunk/libavcodec/flac.c
Michael Niedermayer
michaelni
Tue Jun 12 11:49:08 CEST 2007
Hi
On Tue, Jun 12, 2007 at 10:03:41AM +0200, Benoit Fouet wrote:
> Hi,
>
> gpoirier wrote:
> > Modified: trunk/libavcodec/flac.c
> > ==============================================================================
> > --- trunk/libavcodec/flac.c (original)
> > +++ trunk/libavcodec/flac.c Tue Jun 12 09:59:43 2007
> > @@ -684,8 +673,8 @@ static int flac_decode_frame(AVCodecCont
> > {\
> > int a= s->decoded[0][i];\
> > int b= s->decoded[1][i];\
> > - *(samples++) = (left ) >> (16 - s->bps);\
> > - *(samples++) = (right) >> (16 - s->bps);\
> > + *(samples++) = (left << (24 - s->bps)) >> 8;\
> > + *(samples++) = (right << (24 - s->bps)) >> 8;\
> >
>
> as i already said, this code lacks parentheses
depends on how you define lacks ...
its not wrong as it is, though its fragile and could break if something
else is used as left/right
so i agree it should have parentheses around the macro arguments
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20070612/2f9df35f/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list