[MPlayer-dev-eng] [PATCH] Fix NAS ao for small files.

Diego Biurrun diego at biurrun.de
Sun Aug 17 13:06:40 CEST 2008


On Fri, Aug 15, 2008 at 11:05:33PM +0200, Tobias Diedrich wrote:
> Diego Biurrun wrote:
> > On Fri, Aug 15, 2008 at 06:23:03PM +0200, Tobias Diedrich wrote:
> > > 
> > > someone pointed out to me that the NAS ao does not work correctly
> > > with very small .wav files (or really anything where less than
> > > outburst is to be played).
> > > 
> > > The attached patch should fix that (and has been lying on my disk a
> > > bit long, but still applies to current svn).
> > 
> > Applied, you are the maintainer.  I assume that you never received a new
> > account after the Subversion migration?
> 
> Yeah well no, if you want to give me one, go ahead, but I rarely
> find time to fiddle with MPlayer these days unfortunately...
> So I guess we might be talking about once in a year or so commits
> here. :)

Send me an encrypted email with your password and I will create your
account.

> > While we're talking about ao_nas: It prints a lot of warnings, including
> > some void* arithmetic warnings.  Maybe you could look into fixing this.
> 
> Sure, I can do that.
> *look*
> Hmm, I don't see any void* warnings, do I have to enable some debug
> option?
> The build-system uses "cc -Wdisabled-optimization -Wno-pointer-sign
> -Wdeclaration-after-statement -std=gnu99 -I. -W -Wall -O2
> -march=native -mtune=native -pipe -g  -D_REENTRANT
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
> -I/usr/include/freetype2   -c -o libao2/ao_nas.o libao2/ao_nas.c"
> and cc is "cc (Debian 4.3.1-2) 4.3.1".

silver:/var/tmp/mplayer_vanilla $ make libao2/ao_nas.o
cc -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -I. -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 -march=k6-3 -mtune=k6-3 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/usr/include/directfb -I/usr/include/  -I/usr/include/SDL  -D_REENTRANT -I/usr/include/kde/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12     -c -o libao2/ao_nas.o libao2/ao_nas.c
libao2/ao_nas.c: In function 'nas_readBuffer':
libao2/ao_nas.c:177: warning: pointer of type 'void *' used in arithmetic
libao2/ao_nas.c: In function 'nas_writeBuffer':
libao2/ao_nas.c:200: warning: pointer of type 'void *' used in arithmetic
libao2/ao_nas.c: In function 'nas_event_handler':
libao2/ao_nas.c:264: warning: format '%d' expects type 'int', but argument 9 has type 'AuUint32'
libao2/ao_nas.c: In function 'control':
libao2/ao_nas.c:364: warning: format '%08x' expects type 'unsigned int', but argument 4 has type 'AuFixedPoint'
libao2/ao_nas.c:375: warning: format '%08x' expects type 'unsigned int', but argument 4 has type 'AuFixedPoint'
silver:/var/tmp/mplayer_vanilla $ cc --version
cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

> Patch for 'comparison between signed and unsigned' attached.
 
Please create patches from the root of the source tree.

> BTW, ao_oss gives me a "cast from pointer to integer of different
> size" on line 169 (because I'm on amd64 and void* is cast to int).

Fix it when your account is enabled :)

Diego



More information about the MPlayer-dev-eng mailing list