[MPlayer-dev-eng] Fix build with --enable-vf-lavfi
Diego Biurrun
diego at biurrun.de
Sun Feb 5 12:17:13 CET 2012
On Sat, Feb 04, 2012 at 10:42:10PM +0100, Clément Bœsch wrote:
>
> 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…
It will fail to find -lswresample and not link of course.
> --- Makefile (revision 34652)
> +++ Makefile (working copy)
> @@ -689,7 +689,7 @@
>
> # (linking) order matters for these libraries
> -FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil
> +FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil libswresample
That works? libswresample does not have libavutil dependencies?
I wrote the comment above for a reason..
> --- 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
As Reinhard said, you would have to check if the lib you link against
exists if you want to support libav.
Diego
More information about the MPlayer-dev-eng
mailing list