[MPlayer-cvslog] r25065 - trunk/stream/stream_dvd.c
Ivo
ivop at euronet.nl
Sun Nov 18 20:06:05 CET 2007
On Saturday 17 November 2007 19:20, reimar wrote:
> Author: reimar
> Date: Sat Nov 17 19:20:04 2007
> New Revision: 25065
>
> Log:
> Use AV_WB32 instead of manual bit-fiddling when setting DVD speed
This broke compilation for me:
$ svn up -r25064 && make stream_dvd.o
U stream_dvd.c
Updated to revision 25064.
cc -I../libavcodec -I../libavformat -Wdisabled-optimization
-Wdeclaration-after-statement -I. -I.. -I../libavutil
-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4
-march=athlon-xp -mtune=athlon-xp -pipe -ffast-math
-fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHAVE_CONFIG_H
-I/home/ivo/em8300-cvs/include/ -I/usr/include/SDL
-D_REENTRANT -I/usr/include/freetype2 -I/usr/include
-c -o stream_dvd.o stream_dvd.c
stream_dvd.c: In function `dvd_parse_chapter_range':
stream_dvd.c:170: warning: passing arg 2 of `strtol' from incompatible
pointer type
$ svn up -r25065 && make stream_dvd.o
U stream_dvd.c
Updated to revision 25065.
cc -I../libavcodec -I../libavformat -Wdisabled-optimization
-Wdeclaration-after-statement -I. -I.. -I../libavutil
-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4
-march=athlon-xp -mtune=athlon-xp -pipe -ffast-math
-fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHAVE_CONFIG_H
-I/home/ivo/em8300-cvs/include/ -I/usr/include/SDL
-D_REENTRANT -I/usr/include/freetype2 -I/usr/include
-c -o stream_dvd.o stream_dvd.c
In file included from ../libavutil/intreadwrite.h:23,
from stream_dvd.c:41:
../libavutil/bswap.h:42: error: syntax error before "__extension__"
../libavutil/bswap.h:42: warning: type defaults to `int' in declaration of
`__v'
../libavutil/bswap.h:42: warning: data definition has no type or storage
class
../libavutil/bswap.h:42: error: syntax error before '}' token
../libavutil/bswap.h:56: error: syntax error before "__extension__"
../libavutil/bswap.h:56: warning: type defaults to `int' in declaration of
`__v'
../libavutil/bswap.h:56: warning: redundant redeclaration of '__v'
../libavutil/bswap.h:42: warning: previous declaration of '__v' was here
../libavutil/bswap.h:56: warning: data definition has no type or storage
class
../libavutil/bswap.h:56: error: syntax error before '}' token
../libavutil/bswap.h:97: error: syntax error before "__extension__"
../libavutil/bswap.h:97: error: syntax error before '}' token
../libavutil/bswap.h:97: warning: type defaults to `int' in declaration of
`__w'
../libavutil/bswap.h:97: warning: type defaults to `int' in declaration of
`__r'
../libavutil/bswap.h:97: warning: data definition has no type or storage
class
../libavutil/bswap.h:97: error: syntax error before "if"
../libavutil/bswap.h:97: warning: type defaults to `int' in declaration of
`__v'
../libavutil/bswap.h:97: warning: redundant redeclaration of '__v'
../libavutil/bswap.h:56: warning: previous declaration of '__v' was here
../libavutil/bswap.h:97: warning: data definition has no type or storage
class
../libavutil/bswap.h:97: error: syntax error before '}' token
../libavutil/bswap.h:97: warning: type defaults to `int' in declaration of
`__v'
../libavutil/bswap.h:97: warning: redundant redeclaration of '__v'
../libavutil/bswap.h:97: warning: previous declaration of '__v' was here
../libavutil/bswap.h:97: warning: data definition has no type or storage
class
../libavutil/bswap.h:97: error: syntax error before '}' token
../libavutil/bswap.h:112: error: syntax error before '}' token
../libavutil/bswap.h:112: warning: type defaults to `int' in declaration of
`w'
../libavutil/bswap.h:112: warning: type defaults to `int' in declaration of
`r'
../libavutil/bswap.h:112: warning: data definition has no type or storage
class
../libavutil/bswap.h:113: error: syntax error before '.' token
../libavutil/bswap.h:114: warning: type defaults to `int' in declaration of
`__v'
../libavutil/bswap.h:114: warning: redundant redeclaration of '__v'
../libavutil/bswap.h:97: warning: previous declaration of '__v' was here
../libavutil/bswap.h:114: warning: data definition has no type or storage
class
../libavutil/bswap.h:114: error: syntax error before '}' token
../libavutil/bswap.h:115: warning: type defaults to `int' in declaration of
`__v'
../libavutil/bswap.h:115: warning: redundant redeclaration of '__v'
../libavutil/bswap.h:114: warning: previous declaration of '__v' was here
../libavutil/bswap.h:115: warning: data definition has no type or storage
class
../libavutil/bswap.h:115: error: syntax error before '}' token
stream_dvd.c: In function `dvd_parse_chapter_range':
stream_dvd.c:170: warning: passing arg 2 of `strtol' from incompatible
pointer type
make: *** [stream_dvd.o] Error 1
This is what gcc -E produces:
[...]
# 42 "../libavutil/bswap.h"
static __attribute__((always_inline)) inline uint16_t (__extension__ ({
register
unsigned short int __v, __x = (uint16_t x); if (__builtin_constant_p (__x))
__v
= ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)); else __asm__ ("rorw
$8, %w0"
: "=r" (__v) : "0" (__x) : "cc"); __v; }))
{
[...]
It really messed up what used to be this code:
42: static av_always_inline uint16_t bswap_16(uint16_t x)
43: {
After further investigation, I found out that libavutil/bswap.h includes
<byteswap.h> conditionally and the condition is met in my ffmpeg tree
(which compiles fine) but not in my mplayer tree. The condition is
HAVE_BYTESWAP_H. And byteswap.h probably gets included indirectly anyway,
which causes bswap_16 to be a macro (defines to __bswap_16 which is in
bits/byteswap.h an contains the above code that bails out).
I think checking for byteswap.h in configure and setting HAVE_BYTESWAP_H
accordingly should suffice, shouldn't it?
--Ivo
More information about the MPlayer-cvslog
mailing list