[FFmpeg-devel] [PATCH] Fix Vorbis encoder Xiph dependency
Aurelien Jacobs
aurel
Thu May 10 17:00:13 CEST 2007
On Thu, 10 May 2007 16:31:27 +0200
Diego Biurrun <diego at biurrun.de> wrote:
> On Thu, May 10, 2007 at 04:18:28PM +0200, Panagiotis Issaris wrote:
> >
> > When configuring ffmpeg with all decoders disabled, a problem occurs:
> > ./configure --disable-decoders
> > ...
> > gcc -L"/usr/local/src/ffmpeg"/libavformat
> > - -L"/usr/local/src/ffmpeg"/libavcodec -L"/usr/local/src/ffmpeg"/libavutil
> > - -Wl,--warn-common -rdynamic -export-dynamic -Wl,--as-needed
> > - -Wl,-rpath-link,"/usr/local/src/ffmpeg"/libavcodec
> > - -Wl,-rpath-link,"/usr/local/src/ffmpeg"/libavformat
> > - -Wl,-rpath-link,"/usr/local/src/ffmpeg"/libavutil -g -o ffmpeg_g
> > ffmpeg.o cmdutils.o -lavformat -lavcodec -lavutil -lm -lz -ldl
> > /usr/local/src/ffmpeg/libavcodec/libavcodec.a(vorbis.o): In function `vorbis_decode_init':
> > /usr/local/src/ffmpeg/libavcodec/vorbis.c:1061: undefined reference to `ff_split_xiph_headers'
> > collect2: ld returned 1 exit status
> > make: *** [ffmpeg_g] Error 1
> >
> > The attached patch fixes this by making sure the Vorbis' encoders
> > references to ff_split_xiph_headers() are there.
> >
> > --- libavcodec/Makefile (revision 8977)
> > +++ libavcodec/Makefile (working copy)
> > @@ -171,7 +171,7 @@
> > OBJS-$(CONFIG_VORBIS_DECODER) += vorbis.o vorbis_data.o xiph.o
> > -OBJS-$(CONFIG_VORBIS_ENCODER) += vorbis_enc.o vorbis.o vorbis_data.o
> > +OBJS-$(CONFIG_VORBIS_ENCODER) += vorbis_enc.o vorbis.o vorbis_data.o xiph.o
>
> Looks OK, commit.
Hum... No it's not really ok.
Well it fixes the bug, but not in the most beautiful way.
vorbis.c contains mostly the vorbis decoder code plus a few
common function used by the encoder. ff_split_xiph_headers
is only needed by the decoder.
I will split vorbis.c to avoid this inapropriate dependency.
Aurel
More information about the ffmpeg-devel
mailing list