[FFmpeg-cvslog] r15595 - trunk/libavcodec/aac_parser.c

Uoti Urpala uoti.urpala
Tue Dec 2 01:40:02 CET 2008


On Tue, 2008-12-02 at 00:05 +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Sat, Oct 11, 2008 at 01:21:45PM +0200, mru wrote:
> >> Author: mru
> >> Date: Sat Oct 11 13:21:45 2008
> >> New Revision: 15595
> >> 
> >> Log:
> >> aac_parser: fix strict aliasing violation
> >
> > This change is insufficient, the code still is not working without
> > -fno-strict-aliasing

> Damn.  It worked with all compilers I had installed at the time.  Can
> you think of a solution?

static inline unsigned int working_get_bits(uint64_t state, int *remaining, n)
{
    *remaining -= n;
    return (state >> *remaining) & (1 << n) - 1;
}

I didn't test whether that really works, but it shouldn't need anything
more complex (and you can use the same function for skip_bits). It
should also be faster than using the bitstream reader machinery.





More information about the ffmpeg-cvslog mailing list