[MPlayer-dev-eng] avcodec_pix_fmt_to_codec_tag undefined fix

Steven M. Schultz sms at 2BSD.COM
Tue May 3 06:09:19 CEST 2005


Hi

	This was commented on earlier:

cc -I../libvo -I../../libvo -I/usr/X11/include -O4   -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I. -I/usr/include/freetype2   -I/usr/include/SDL -D_REENTRANT -I/usr/X11/include       -o mplayer mplayer.o mp_msg.o cpudetect.o codec-cfg.o spudec.o playtree.o playtreeparser.o asxparser.o vobsub.o subreader.o sub_cc.o find_sub.o m_config.o m_option.o parser-cfg.o m_struct.o edl.o unrarlib.o mixer.o parser-mpcmd.o subopt-helper.o libvo/libvo.a libao2/libao2.a    libmpcodecs/libmpcodecs.a   libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a -Llibmpdvdkit2 -lmpdvdkit libavcodec/libavcodec.a libavformat/libavformat.a  -lmad -ldv -ltheora -logg -lfaad -llzo -lmp3lame  -lxvidcore -lm  -lpng -lz -lz -ljpeg -lasound -ldl -lpthread   -lfaac -L/usr/lib64 -Wl,--rpath -Wl,/usr/lib64 -lfreetype  -lcdda_interface -lcdda_paranoia -lnsl  -lungif  -lsmbclient  -L/usr/lib64 -lfontconfig    mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a tremor/libvorbisidec.a  -laa -lGL -lXxf86dga -lXv  -lXxf86vm -lXinerama -L/usr/X11R6/lib64 -lXext -lX11 -lnsl -lnsl -L/usr/lib64 -lSDL -lpthread       -L/opt/kde3/lib64 -ldl -lartsc -lpthread -L/opt/gnome/lib64 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -L/usr/lib64 -lesd -laudiofile -lm -lasound      -llirc_client   -lpthread -ldl -rdynamic   -lm
libavformat/libavformat.a(utils.o)(.text+0x403c): In function `av_find_stream_info':
utils.c: undefined reference to `avcodec_pix_fmt_to_codec_tag'
collect2: ld returned 1 exit status
gmake: *** [mplayer] Error 1

	The fix is attached.  The symbol avcodec_pix_fmt_to_codec_tag is
	in libavcodec.a but referenced in libavformat.a.  It's a classic
	ordering problem - the symbol isn't undefined at the time the
	libavcodec.a library is searched.

	Swapping the order of libavcodec and libavformat in config.mak
	allows the build to run to successful completion.

	Cheers,
	Steven Schultz
-------------- next part --------------
--- config.mak.dist	2005-05-02 20:52:16.000000000 -0700
+++ config.mak	2005-05-02 21:02:39.000000000 -0700
@@ -121,7 +121,7 @@
 DS_DEP = 
 DS_LIB = 
 AV_DEP = libavcodec/libavcodec.a libavformat/libavformat.a
-AV_LIB = libavcodec/libavcodec.a libavformat/libavformat.a
+AV_LIB = libavformat/libavformat.a libavcodec/libavcodec.a
 CONFIG_LIBAVCODEC = yes
 CONFIG_LIBAVFORMAT = yes
 ZORAN = no


More information about the MPlayer-dev-eng mailing list