From b9e9ab79062bbf92cc02ca9fac0ee06d23cc16f6 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Wed, 14 May 2008 15:15:52 +0000 Subject: [PATCH] The swscale check was enabling ffmpeg without checking if ffmpeg had been detected or not. This reworks how ffmpeg is detected and it is now _disabled_ if swscale does not exist. Also fix some nearby style issues. Originally committed to SVN as r2192. --- configure.in | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 2f1e82dad..0a4fd7973 100644 --- a/configure.in +++ b/configure.in @@ -405,11 +405,11 @@ fi AC_ARG_WITH(ffmpeg, [ --without-ffmpeg build without FFMPEG video provider. (default: auto)], ffmpeg_disabled="(disabled)") if test "$with_ffmpeg" != "no"; then - AC_CHECK_LIB([avcodec], [avcodec_init],AVCODEC_LDFLAGS="-lavcodec", [with_ffmpeg=no]) - AC_CHECK_LIB([avformat], [av_read_frame],AVFORMAT_LDFLAGS="-lavformat", [with_ffmpeg=no]) + AC_CHECK_LIB([avcodec], [avcodec_init],[AVCODEC_LDFLAGS="-lavcodec"; with_ffmpeg="yes"], [with_ffmpeg="no"]) + AC_CHECK_LIB([avformat], [av_read_frame],[AVFORMAT_LDFLAGS="-lavformat"; with_ffmpeg="yes"], [with_ffmpeg="no"]) if test "$build_darwin" = "yes"; then - AC_CHECK_LIB([avutil], [av_free],[AVUTIL_LDFLAGS="-lavutil"], [with_ffmpeg="no"]) + AC_CHECK_LIB([avutil], [av_free],[AVUTIL_LDFLAGS="-lavutil"; with_ffmpeg="yes"], [with_ffmpeg="no"]) fi AC_CHECK_LIB([avformat], [sws_scale],[with_swscale="yes"], [with_swscale="no"]) @@ -417,15 +417,12 @@ if test "$with_ffmpeg" != "no"; then AC_CHECK_LIB([swscale], [sws_scale],[SWSCALE_LDFLAGS="-lswscale"; with_swscale_lib="yes"], [with_swscale_lib="no"]) fi - if test "$with_swscale" = "yes" || test "$with_swscale_lib" = "yes"; then - with_ffmpeg="yes"; - else + if test "$with_swscale" = "no" && test "$with_swscale_lib" = "no"; then with_ffmpeg="no"; fi if test "$with_ffmpeg" = "yes"; then - found_video_provider=yes - with_ffmpeg="yes" + found_video_provider="yes" AC_DEFINE(WITH_FFMPEG, 1, [Enable FFMPEG Video Provider]) fi fi