[FFmpeg-cvslog] r11679 - trunk/libavcodec/apedec.c
Michael Niedermayer
michaelni
Thu Jan 31 03:10:38 CET 2008
On Thu, Jan 31, 2008 at 01:59:35AM +0000, M?ns Rullg?rd wrote:
> bcoudurier <subversion at mplayerhq.hu> writes:
>
> > Author: bcoudurier
> > Date: Thu Jan 31 01:10:56 2008
> > New Revision: 11679
> >
> > Log:
> > cast to correct type, fix warning: apedec.c:859: warning: passing argument 1 of 's->dsp.bswap_buf' from incompatible pointer type
> >
> > Modified:
> > trunk/libavcodec/apedec.c
> >
> > Modified: trunk/libavcodec/apedec.c
> > ==============================================================================
> > --- trunk/libavcodec/apedec.c (original)
> > +++ trunk/libavcodec/apedec.c Thu Jan 31 01:10:56 2008
> > @@ -856,7 +856,7 @@ static int ape_decode_frame(AVCodecConte
> >
> > if(!s->samples){
> > s->data = av_realloc(s->data, (buf_size + 3) & ~3);
> > - s->dsp.bswap_buf(s->data, buf, buf_size >> 2);
> > + s->dsp.bswap_buf((uint32_t*)s->data, (uint32_t*)buf, buf_size >> 2);
>
> Is proper alignment guaranteed here?
No, the return of av_realloc() has no guranteed alignment beyond what is
needed by C code on the architecture. Though i have some doubt that theres
a platform out there having less than aligned by 4 values comming out of
realloc() ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080131/48b54d91/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list