GNOME Bugzilla – Bug 584399
FFmpeg libraries are included in incorrect order when external FFmpeg is used
Last modified: 2009-06-01 15:25:58 UTC
When external FFmpeg is used, configure.ac does: PKG_CHECK_MODULES(FFMPEG, libavutil libavcodec libavformat) PKG_CHECK_MODULES(POSTPROC, libavutil libavcodec libpostproc) PKG_CHECK_MODULES(SWSCALE, libavutil libswscale) which implicitly adds proper libraries to the list of linker's arguments. But when internal FFmpeg is used, all library dependences are specified explicitly: FFMPEG_LIBS="\$(top_builddir)/gst-libs/ext/ffmpeg/libavformat/libavformat.a \ \$(top_builddir)/gst-libs/ext/ffmpeg/libavcodec/libavcodec.a \ \$(top_builddir)/gst-libs/ext/ffmpeg/libavutil/libavutil.a" POSTPROC_LIBS="\$(top_builddir)/gst-libs/ext/ffmpeg/libpostproc/libpostproc.a \ \$(top_builddir)/gst-libs/ext/ffmpeg/libavutil/libavutil.a" SWSCALE_LIBS="\$(top_builddir)/gst-libs/ext/ffmpeg/libswscale/libswscale.a \ \$(top_builddir)/gst-libs/ext/ffmpeg/libavutil/libavutil.a" The order (format->codec->util in the latter and util->codec->format in the former) is different and the difference causes gst-ffmpeg to spew link-time errors ("undefined reference to ...") when linking against external FFmpeg.
Created attachment 135691 [details] [review] Changes the library inclusion order
commit 5917098edf51956ceefc65772be59e9e7c1e0fc5 Author: LRN <lrn1986 at gmail.com> Date: Mon Jun 1 17:24:53 2009 +0200 ffmpeg: change library inclusion order Fixes #584399