[MPlayer-dev-eng] [PATCH] use libavutil fifo.h in ao_macosx.c

Guillaume POIRIER poirierg at gmail.com
Mon Mar 9 22:33:57 CET 2009


On Mon, Mar 9, 2009 at 7:49 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> Hello,
> I can not test it but this patch changes ao_macosx to use
> libavutil/fifo.h like ao_sdl and ao_jack.

This breaks at link stage, but I don't know why right now:

gcc-4.2 -Wundef -Wdisabled-optimization -Wno-pointer-sign
-Wdeclaration-after-statement -std=gnu99 -Wall -Wno-switch
-Wpointer-arith -Wredundant-decls -O4 -march=core2 -mtune=core2 -pipe
-ffast-math -fomit-frame-pointer -mdynamic-no-pic -falign-loops=16
-shared-libgcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE -I. -I/opt/local/include/ -I/usr/local/include
-I/usr/X11/include -Ilibdvdread4 -I/usr/local/include/freetype2
-I/usr/local/include   -c -o libao2/ao_macosx.o libao2/ao_macosx.c
libao2/ao_macosx.c: In function 'theRenderProc':
libao2/ao_macosx.c:123: warning: implicit declaration of function 'buf_used'
libao2/ao_macosx.c: In function 'OpenSPDIF':
libao2/ao_macosx.c:694: warning: 'AudioDeviceAddIOProc' is deprecated
(declared at /System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2067)
libao2/ao_macosx.c: In function 'uninit':
libao2/ao_macosx.c:1022: warning: 'AudioDeviceRemoveIOProc' is
deprecated (declared at
/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:2081)

[...] link

Undefined symbols:
  "_buf_used", referenced from:
      _RenderCallbackSPDIF in ao_macosx.o
      _uninit in ao_macosx.o
      _uninit in ao_macosx.o
      _theRenderProc in ao_macosx.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1



> I think it could generally use some love, e.g. there is quite
> a bit of duplicated code, the write_buffer and read_buffer return
> values are incorrectly ignored, malloc results are uselessly cast,
> and there are some pointless if (a) free(a); constructs. A close review
> probably could find more...
>
> Greetings,
> Reimar Döffinger
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>



-- 
Only a very small fraction of our DNA does anything; the rest is all
comments and ifdefs.

Ani DiFranco  - "Art may imitate life, but life imitates TV."



More information about the MPlayer-dev-eng mailing list