[Ffmpeg-devel] compiling on Solaris 10

Ryan Martell rdm4
Thu Dec 7 16:16:03 CET 2006


Hi Bjoern--

On Dec 7, 2006, at 8:52 AM, Bjoern Rost wrote:
> Then, I get this error:
>
> In file included from rtp.c:21:
> avformat.h:243: warning: `AVFrac' is deprecated (declared at
> avformat.h:94)
> rtp.c: In function `rtp_parse_mp4_au':
> rtp.c:511: error: invalid operands to binary &
> rtp.c:511: error: invalid operands to binary >>

For reference, this is:
     /* decode the first 2 bytes where are stored the AUHeader sections
        length in bits */
     au_headers_length = BE_16(buf);

> and
>
> In file included from rtp_h264.c:39:
> avformat.h:243: warning: `AVFrac' is deprecated (declared at
> avformat.h:94)
> rtp_h264.c: In function `h264_handle_packet':
> rtp_h264.c:216: error: invalid operands to binary &
> rtp_h264.c:216: error: invalid operands to binary >>

For reference, this is:
                 do {
                     uint16_t nal_size = BE_16(src); // this going to  
be a problem if unaligned (can it be?)

> I got around these by using pointers dereference thingies ('*buf'
> instead of 'buf')

I just looked at these (since they're my commits):

 From avcodec.h:
#if !defined(BE_16) || !defined(BE_32) || !defined(LE_16) || !defined 
(LE_32)
#define BE_16(x)  ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
#define BE_32(x)  ((((uint8_t*)(x))[0] << 24) | \
                    (((uint8_t*)(x))[1] << 16) | \
                    (((uint8_t*)(x))[2] << 8) | \
                     ((uint8_t*)(x))[3])
#define LE_16(x)  ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
#define LE_32(x)  ((((uint8_t*)(x))[3] << 24) | \
                    (((uint8_t*)(x))[2] << 16) | \
                    (((uint8_t*)(x))[1] << 8) | \
                     ((uint8_t*)(x))[0])
#endif

So your environment must already have a BE_16 that is defined to take  
a value, instead of a pointer.

Have we seen this before?

I can easily change these to be2me_16, if that won't have an  
alignment issue.

Thanks,
-Ryan




More information about the ffmpeg-devel mailing list