[MPlayer-dev-eng] Fix build with --enable-vf-lavfi

Clément Bœsch ubitux at gmail.com
Sat Feb 4 22:42:10 CET 2012


Hi,

I saw on mplayer-user a build issue with --enable-vf-lavfi, and since I'm
somehow at fault because of the new libswresample dependency, here is a
patch.

I didn't test it thoroughly though (only the default static in-place build
method is tested).  Also, I'm not sure what happens if we try to link with
libav since they still stick with the old API…

Regards,

-- 
Clément B.
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 34652)
+++ Makefile	(working copy)
@@ -689,7 +689,7 @@
                 $(SRCS_MENCODER-yes)
 
 # (linking) order matters for these libraries
-FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil
+FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil libswresample
 FFMPEGLIBS  = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a)
 FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(addprefix ffmpeg/$(part)/,*.[chS] /*/*.[chS] /*/*.asm)))
 
Index: configure
===================================================================
--- configure	(revision 34652)
+++ configure	(working copy)
@@ -6715,12 +6715,12 @@
 elif test "$ffmpeg_so" = auto ; then
   ffmpeg_so=no
   if $_pkg_config --exists libavutil ; then
-    inc_ffmpeg=$($_pkg_config --cflags libpostproc libswscale libavformat libavcodec libavutil)
-    ld_tmp=$($_pkg_config --libs libpostproc libswscale libavformat libavcodec libavutil)
+    inc_ffmpeg=$($_pkg_config --cflags libpostproc libswscale libavformat libavcodec libavutil libswresample)
+    ld_tmp=$($_pkg_config --libs libpostproc libswscale libavformat libavcodec libavutil libswresample)
     header_check libavutil/avutil.h $inc_ffmpeg $ld_tmp &&
       extra_ldflags="$extra_ldflags $ld_tmp" && ffmpeg_so=yes && ffmpeg=yes
-  elif header_check libavutil/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil ; then
-    extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil"
+  elif header_check libavutil/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil -lswresample; then
+    extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lswresample"
     ffmpeg_so=yes
     ffmpeg=yes
   fi
@@ -8160,6 +8160,7 @@
 CONFIG_AVUTIL   = $ffmpeg_a
 CONFIG_POSTPROC = $ffmpeg_a
 CONFIG_SWSCALE  = $ffmpeg_a
+CONFIG_SWRESAMPLE = $ffmpeg_a
 
 ASFLAGS    = \$(CFLAGS)
 AS_DEPFLAGS= $DEPFLAGS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120204/7bdc810b/attachment.asc>


More information about the MPlayer-dev-eng mailing list