From d9cb27ecc1614561769129ea3a5b4f9130488a24 Mon Sep 17 00:00:00 2001 From: Faustino Osuna Date: Fri, 29 Feb 2008 01:43:53 +0000 Subject: [PATCH] Too many problems with new ffmpeg detection, reverting to last known good (rev 25403). --- configure.ac | 35 ++++++------------- extras/buildsystem/cmake/config.h.cmake | 11 +++--- extras/buildsystem/cmake/include/config.cmake | 7 ++-- modules/codec/ffmpeg/audio.c | 4 +-- modules/codec/ffmpeg/chroma.c | 10 +++--- modules/codec/ffmpeg/deinterlace.c | 4 +-- modules/codec/ffmpeg/demux.c | 8 ++--- modules/codec/ffmpeg/encoder.c | 4 +-- modules/codec/ffmpeg/ffmpeg.c | 10 +++--- modules/codec/ffmpeg/mux.c | 8 ++--- modules/codec/ffmpeg/postprocess.c | 4 +-- modules/codec/ffmpeg/scale.c | 10 ++---- modules/codec/ffmpeg/video.c | 6 ++-- modules/codec/ffmpeg/video_filter.c | 8 ++--- modules/codec/zvbi.c | 12 +++---- modules/stream_out/switcher.c | 4 +-- 16 files changed, 53 insertions(+), 92 deletions(-) diff --git a/configure.ac b/configure.ac index 5f36116926..ca5288f892 100644 --- a/configure.ac +++ b/configure.ac @@ -3058,10 +3058,9 @@ dnl Trying with pkg-config VLC_SAVE_FLAGS CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS}" CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS}" - AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h) - AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h) - AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avformat.h) - + AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] ) + AC_CHECK_HEADERS(ffmpeg/avformat.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avformat.h.])] ) + AC_CHECK_HEADERS(ffmpeg/avutil.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avutil.h.])] ) dnl newer ffmpeg have a separate libpostproc PKG_CHECK_MODULES(POSTPROC, libpostproc,[ VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}]) @@ -3069,7 +3068,7 @@ dnl Trying with pkg-config ],[ true ]) CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}" CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}" - AC_CHECK_HEADERS(postproc/postprocess.h) + AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] ) if test "${SYS}" = "darwin"; then VLC_ADD_BUILTINS([ffmpeg]) else @@ -3089,8 +3088,9 @@ dnl Trying with pkg-config PKG_CHECK_MODULES(SWSCALE,[libswscale],[ VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}]) VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}]) +dnl AC_CHECK_HEADERS(ffmpeg/swscale.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/swscale.h.])]) AC_CHECK_LIB(swscale, sws_getContext, - [AC_CHECK_HEADERS([ffmpeg/avutil.h libavutil/avutil.h ffmpeg/swscale.h libswscale/swscale.h])],[],[-lavutil -lm]) + [AC_CHECK_HEADERS([ffmpeg/avutil.h, ffmpeg/swscale.h])],[],[-lavutil -lm]) ],[ true ]) VLC_RESTORE_FLAGS ],[ @@ -3100,10 +3100,10 @@ dnl Trying with pkg-config dnl CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}" LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}" - AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h) - AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h) - AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h) - AC_CHECK_HEADERS(postproc/postprocess.h) + AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] ) + AC_CHECK_HEADERS(ffmpeg/avformat.h) + AC_CHECK_HEADERS(ffmpeg/avutil.h) + AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] ) AC_CHECK_LIB(avutil, av_crc_init, [ VLC_ADD_LIBS([ffmpeg],[-lavutil]) @@ -3128,24 +3128,11 @@ dnl Trying with pkg-config CPPFLAGS="${CPPFLAGS_save}" AC_CHECK_LIB(swscale, sws_getContext, [ - AC_CHECK_HEADERS(libswscale/swscale.h ffmpeg/swscale.h) + AC_CHECK_HEADERS(ffmpeg/swscale.h) VLC_ADD_LIBS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL]) LDFLAGS="${LDFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}" ]) - - if test "$ac_cv_header_libavcodec_avcodec_h" = "no" && test "$ac_cv_header_ffmpeg_avcodec_h" = "no"; then - AC_MSG_ERROR([Missing header file libavcodec/avcodec.h.]) - fi - if test "$ac_cv_header_libavformat_avformat_h" = "no" && test $"ac_cv_header_ffmpeg_avformat_h" = "no"; then - AC_MSG_ERROR([Missing header file libavformat/avformat.h.]) - fi - if test "$ac_cv_header_libavutil_avutil_h" = "no" && test "$ac_cv_header_ffmpeg_avutil_h" = "no"; then - AC_MSG_ERROR([Missing header file libavutil/avutil.h.]) - fi - if test "$ac_cv_header_libswscale_swscale_h" = "no" && test "$ac_cv_header_ffmpeg_swscale_h" = "no"; then - AC_MSG_ERROR([Missing header file libswscale/swscale.h.]) - fi fi fi diff --git a/extras/buildsystem/cmake/config.h.cmake b/extras/buildsystem/cmake/config.h.cmake index b60c9c7af4..29a1a8d13a 100644 --- a/extras/buildsystem/cmake/config.h.cmake +++ b/extras/buildsystem/cmake/config.h.cmake @@ -87,14 +87,11 @@ #cmakedefine HAVE_ERRNO_H #cmakedefine HAVE_FAAD_H #cmakedefine HAVE_FCNTL_H -#cmakedefine HAVE_FFMPEG_AVCODEC_H -#cmakedefine HAVE_FFMPEG_AVFORMAT_H -#cmakedefine HAVE_FFMPEG_AVUTIL_H +#cmakedefine HAVE_FFMPEG_AVCODEC_H +#cmakedefine HAVE_FFMPEG_AVFORMAT_H +#cmakedefine HAVE_FFMPEG_AVUTIL_H +#cmakedefine HAVE_FFMPEG_AVUTIL_H_ #cmakedefine HAVE_FFMPEG_SWSCALE_H -#cmakedefine HAVE_LIBAVCODEC_AVCODEC_H -#cmakedefine HAVE_LIBAVFORMAT_AVFORMAT_H -#cmakedefine HAVE_LIBAVUTIL_AVUTIL_H -#cmakedefine HAVE_LIBSWSCALE_SWSCALE_H #cmakedefine HAVE_FLAC_STREAM_DECODER_H #cmakedefine HAVE_FONTCONFIG_FONTCONFIG_H #cmakedefine HAVE_FORK diff --git a/extras/buildsystem/cmake/include/config.cmake b/extras/buildsystem/cmake/include/config.cmake index e458c6fe27..c923363450 100644 --- a/extras/buildsystem/cmake/include/config.cmake +++ b/extras/buildsystem/cmake/include/config.cmake @@ -451,9 +451,10 @@ if(FFmpeg_FOUND) set( CMAKE_REQUIRED_FLAGS_saved ${CMAKE_REQUIRED_FLAGS} ) set( CMAKE_REQUIRED_FLAGS ${FFmpeg_CFLAGS} ) - vlc_check_include_files (libavcodec/avcodec.h ffmpeg/avcodec.h) - vlc_check_include_files (libavutil/avutil.h ffmpeg/avutil.h) - vlc_check_include_files (libswscale/swscale.h ffmpeg/swscale.h) + vlc_check_include_files (ffmpeg/avcodec.h) + vlc_check_include_files (ffmpeg/avutil.h) + vlc_check_include_files (ffmpeg/swscale.h) + check_include_files (swscale.h HAVE_LIBSWSCALE_TREE) check_include_files ("stdint.h;postproc/postprocess.h" HAVE_POSTPROC_POSTPROCESS_H) vlc_enable_modules(ffmpeg) diff --git a/modules/codec/ffmpeg/audio.c b/modules/codec/ffmpeg/audio.c index f8274e5b30..9bc9cef9e6 100644 --- a/modules/codec/ffmpeg/audio.c +++ b/modules/codec/ffmpeg/audio.c @@ -35,9 +35,7 @@ #include /* ffmpeg header */ -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include diff --git a/modules/codec/ffmpeg/chroma.c b/modules/codec/ffmpeg/chroma.c index 50b16bcf6b..66e6ff405b 100644 --- a/modules/codec/ffmpeg/chroma.c +++ b/modules/codec/ffmpeg/chroma.c @@ -32,14 +32,12 @@ #include #include -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) +#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) #include #endif /* ffmpeg header */ -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include @@ -47,7 +45,7 @@ #include "ffmpeg.h" -#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) +#if !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) void E_(InitLibavcodec) ( vlc_object_t *p_object ); static void ChromaConversion( vout_thread_t *, picture_t *, picture_t * ); @@ -363,4 +361,4 @@ void E_(CloseChroma)( vlc_object_t *p_this ) free( p_vout->chroma.p_sys ); } -#endif /* !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */ +#endif /* !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */ diff --git a/modules/codec/ffmpeg/deinterlace.c b/modules/codec/ffmpeg/deinterlace.c index 29145a3dc4..db46f77a95 100644 --- a/modules/codec/ffmpeg/deinterlace.c +++ b/modules/codec/ffmpeg/deinterlace.c @@ -35,9 +35,7 @@ #include /* ffmpeg header */ -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include diff --git a/modules/codec/ffmpeg/demux.c b/modules/codec/ffmpeg/demux.c index becc7b2fab..07f948cee8 100644 --- a/modules/codec/ffmpeg/demux.c +++ b/modules/codec/ffmpeg/demux.c @@ -36,9 +36,7 @@ #include /* ffmpeg header */ -#if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) -# include -#elif defined(HAVE_FFMPEG_AVFORMAT_H) +#ifdef HAVE_FFMPEG_AVFORMAT_H # include #elif defined(HAVE_LIBAVFORMAT_TREE) # include @@ -49,7 +47,7 @@ //#define AVFORMAT_DEBUG 1 /* Version checking */ -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) +#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE) /***************************************************************************** * demux_sys_t: demux descriptor @@ -503,4 +501,4 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence ) return stream_Tell( p_demux->s ); } -#endif /* HAVE_LIBAVFORMAT_AVFORMAT_H */ +#endif /* HAVE_FFMPEG_AVFORMAT_H */ diff --git a/modules/codec/ffmpeg/encoder.c b/modules/codec/ffmpeg/encoder.c index a042152541..c0ec8c827f 100644 --- a/modules/codec/ffmpeg/encoder.c +++ b/modules/codec/ffmpeg/encoder.c @@ -41,9 +41,7 @@ /* ffmpeg header */ #define HAVE_MMX 1 -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include diff --git a/modules/codec/ffmpeg/ffmpeg.c b/modules/codec/ffmpeg/ffmpeg.c index 66a40a7739..541124c319 100644 --- a/modules/codec/ffmpeg/ffmpeg.c +++ b/modules/codec/ffmpeg/ffmpeg.c @@ -34,9 +34,7 @@ /* ffmpeg header */ #define HAVE_MMX 1 -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include @@ -76,7 +74,7 @@ static const char *nloopf_list_text[] = static const char *enc_hq_list[] = { "rd", "bits", "simple" }; static const char *enc_hq_list_text[] = { N_("rd"), N_("bits"), N_("simple") }; -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) +#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) static int pi_mode_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; static const char *ppsz_mode_descriptions[] = { N_("Fast bilinear"), N_("Bilinear"), N_("Bicubic (good quality)"), @@ -198,7 +196,7 @@ vlc_module_begin(); add_integer( ENC_CFG_PREFIX "chroma-elim-threshold", 0, NULL, ENC_CHROMA_ELIM_TEXT, ENC_CHROMA_ELIM_LONGTEXT, VLC_TRUE ); -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) +#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE) /* demux submodule */ add_submodule(); set_description( _("FFmpeg demuxer" ) ); @@ -214,7 +212,7 @@ vlc_module_begin(); set_callbacks( E_(OpenMux), E_(CloseMux) ); #endif -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) +#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) /* video filter submodule */ add_submodule(); set_description( _("Video scaling filter") ); diff --git a/modules/codec/ffmpeg/mux.c b/modules/codec/ffmpeg/mux.c index 975921c10c..07b8a99f7a 100644 --- a/modules/codec/ffmpeg/mux.c +++ b/modules/codec/ffmpeg/mux.c @@ -34,8 +34,8 @@ #include /* ffmpeg header */ -#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H -# include +#ifdef HAVE_FFMPEG_AVFORMAT_H +# include #elif defined(HAVE_LIBAVFORMAT_TREE) # include #endif @@ -45,7 +45,7 @@ //#define AVFORMAT_DEBUG 1 /* Version checking */ -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE) +#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE) static const char *ppsz_mux_options[] = { "mux", NULL @@ -505,4 +505,4 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence ) return 0; } -#endif /* HAVE_LIBAVFORMAT_AVFORMAT_H */ +#endif /* HAVE_FFMPEG_AVFORMAT_H */ diff --git a/modules/codec/ffmpeg/postprocess.c b/modules/codec/ffmpeg/postprocess.c index 3a4dd9af76..c5da8e27bc 100644 --- a/modules/codec/ffmpeg/postprocess.c +++ b/modules/codec/ffmpeg/postprocess.c @@ -31,9 +31,7 @@ #include /* ffmpeg header */ -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include diff --git a/modules/codec/ffmpeg/scale.c b/modules/codec/ffmpeg/scale.c index 1a2adb5f71..b238bf8d63 100644 --- a/modules/codec/ffmpeg/scale.c +++ b/modules/codec/ffmpeg/scale.c @@ -34,17 +34,13 @@ #include /* ffmpeg headers */ -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include #endif -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) -# include -#elif defined(HAVE_FFMPEG_H) +#ifdef HAVE_FFMPEG_SWSCALE_H # include #elif defined(HAVE_LIBSWSCALE_TREE) # include @@ -53,7 +49,7 @@ #include "ffmpeg.h" /* Version checking */ -#if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) ) +#if ( (defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) ) /***************************************************************************** * filter_sys_t : filter descriptor diff --git a/modules/codec/ffmpeg/video.c b/modules/codec/ffmpeg/video.c index bce47a94d0..5afef13d85 100644 --- a/modules/codec/ffmpeg/video.c +++ b/modules/codec/ffmpeg/video.c @@ -35,9 +35,7 @@ #include /* hmmm, just for INPUT_RATE_DEFAULT */ /* ffmpeg header */ -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include @@ -845,7 +843,7 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec, dest_pic.data[i] = p_pic->p[i].p_pixels; dest_pic.linesize[i] = p_pic->p[i].i_pitch; } -#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) +#if !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) img_convert( &dest_pic, PIX_FMT_YUV420P, (AVPicture *)p_ff_pic, p_sys->p_context->pix_fmt, diff --git a/modules/codec/ffmpeg/video_filter.c b/modules/codec/ffmpeg/video_filter.c index 9af221640f..886e95777f 100644 --- a/modules/codec/ffmpeg/video_filter.c +++ b/modules/codec/ffmpeg/video_filter.c @@ -35,9 +35,7 @@ #include /* ffmpeg header */ -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include @@ -45,7 +43,7 @@ #include "ffmpeg.h" -#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) +#if !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) void E_(InitLibavcodec) ( vlc_object_t *p_object ); static int CheckInit( filter_t *p_filter ); static picture_t *Process( filter_t *p_filter, picture_t *p_pic ); @@ -568,4 +566,4 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic ) p_pic->pf_release( p_pic ); return p_pic_dst; } -#endif /* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) */ +#endif /* ( (defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) */ diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c index e3cabe44e5..30fc6d5bf1 100644 --- a/modules/codec/zvbi.c +++ b/modules/codec/zvbi.c @@ -136,7 +136,7 @@ struct decoder_sys_t int i_align; /* Misc */ -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) +#ifdef HAVE_FFMPEG_SWSCALE_H image_handler_t *p_image; #endif }; @@ -181,7 +181,7 @@ static int Open( vlc_object_t *p_this ) } memset( p_sys, 0, sizeof(decoder_sys_t) ); -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) +#ifdef HAVE_FFMPEG_SWSCALE_H p_sys->p_image = image_HandlerCreate( VLC_OBJECT(p_dec) ); if( !p_sys->p_image ) { @@ -225,7 +225,7 @@ static int Open( vlc_object_t *p_this ) if( p_sys->b_text ) p_dec->fmt_out.video.i_chroma = VLC_FOURCC('T','E','X','T'); else -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) +#ifdef HAVE_FFMPEG_SWSCALE_H p_dec->fmt_out.video.i_chroma = VLC_FOURCC('Y','U','V','A'); #else p_dec->fmt_out.video.i_chroma = VLC_FOURCC('R','G','B','A'); @@ -246,7 +246,7 @@ static void Close( vlc_object_t *p_this ) var_DelCallback( p_dec, "vbi-page", RequestPage, p_sys ); var_DelCallback( p_dec, "vbi-opaque", Opaque, p_sys ); -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) +#ifdef HAVE_FFMPEG_SWSCALE_H if( p_sys->p_image ) image_HandlerDelete( p_sys->p_image ); #endif if( p_sys->p_vbi_dec ) vbi_decoder_delete( p_sys->p_vbi_dec ); @@ -323,7 +323,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) /* Create a new subpicture region */ memset( &fmt, 0, sizeof(video_format_t) ); fmt.i_chroma = p_sys->b_text ? VLC_FOURCC('T','E','X','T') : -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) +#ifdef HAVE_FFMPEG_SWSCALE_H VLC_FOURCC('Y','U','V','A'); #else VLC_FOURCC('R','G','B','A'); @@ -383,7 +383,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) } else { -#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) +#ifdef HAVE_FFMPEG_SWSCALE_H video_format_t fmt_in; picture_t *p_pic, *p_dest; diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c index 7dd51c7eae..901d138f14 100644 --- a/modules/stream_out/switcher.c +++ b/modules/stream_out/switcher.c @@ -38,9 +38,7 @@ #include #define HAVE_MMX -#if defined(HAVE_LIBAVCODEC_AVCODEC_H) -# include -#elif defined(HAVE_FFMPEG_AVCODEC_H) +#ifdef HAVE_FFMPEG_AVCODEC_H # include #else # include -- 2.39.2