]> git.sesse.net Git - vlc/commitdiff
Let's try this again. Detect older and new versions of ffmpeg and allow for their...
authorFaustino Osuna <riquedafreak@videolan.org>
Fri, 29 Feb 2008 16:44:10 +0000 (16:44 +0000)
committerFaustino Osuna <riquedafreak@videolan.org>
Fri, 29 Feb 2008 16:44:10 +0000 (16:44 +0000)
16 files changed:
configure.ac
extras/buildsystem/cmake/config.h.cmake
extras/buildsystem/cmake/include/config.cmake
modules/codec/ffmpeg/audio.c
modules/codec/ffmpeg/chroma.c
modules/codec/ffmpeg/deinterlace.c
modules/codec/ffmpeg/demux.c
modules/codec/ffmpeg/encoder.c
modules/codec/ffmpeg/ffmpeg.c
modules/codec/ffmpeg/mux.c
modules/codec/ffmpeg/postprocess.c
modules/codec/ffmpeg/scale.c
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video_filter.c
modules/codec/zvbi.c
modules/stream_out/switcher.c

index ca5288f89285261a20b02ef872d2ab64edd670b2..7af22c15016c5049aebabbe8db69b5bcefa2387a 100644 (file)
@@ -3058,9 +3058,9 @@ dnl Trying with pkg-config
      VLC_SAVE_FLAGS
      CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS}"
      CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS}"
-     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.])] )
+     AC_CHECK_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h)
+     AC_CHECK_HEADERS(ffmpeg/avformat.h libavformat/avformat.h)
+     AC_CHECK_HEADERS(ffmpeg/avutil.h libavutil/avutil.h)
      dnl newer ffmpeg have a separate libpostproc
      PKG_CHECK_MODULES(POSTPROC, libpostproc,[
        VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}]) 
@@ -3068,7 +3068,7 @@ dnl Trying with pkg-config
        ],[ true ])
      CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
      CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
-     AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
+     AC_CHECK_HEADERS(postproc/postprocess.h)
      if test "${SYS}" = "darwin"; then
         VLC_ADD_BUILTINS([ffmpeg])
      else
@@ -3088,9 +3088,8 @@ 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, ffmpeg/swscale.h])],[],[-lavutil -lm])
+         [AC_CHECK_HEADERS([ffmpeg/avutil.h libavutil/avutil.h ffmpeg/swscale.h libswscale/swscale.h])],[],[-lavutil -lm])
        ],[ true ])
      VLC_RESTORE_FLAGS
     ],[
@@ -3100,10 +3099,10 @@ dnl    AC_CHECK_HEADERS(ffmpeg/swscale.h, [], [AC_MSG_ERROR([Missing header file
     dnl
       CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}"
-      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_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h)
+      AC_CHECK_HEADERS(ffmpeg/avformat.h libavformat/avformat.h)
+      AC_CHECK_HEADERS(ffmpeg/avutil.h libavutil/avutil.h)
+      AC_CHECK_HEADERS(postproc/postprocess.h)
 
       AC_CHECK_LIB(avutil, av_crc_init, [
         VLC_ADD_LIBS([ffmpeg],[-lavutil])
@@ -3128,7 +3127,7 @@ dnl    AC_CHECK_HEADERS(ffmpeg/swscale.h, [], [AC_MSG_ERROR([Missing header file
       CPPFLAGS="${CPPFLAGS_save}"
 
       AC_CHECK_LIB(swscale, sws_getContext, [
-        AC_CHECK_HEADERS(ffmpeg/swscale.h)
+        AC_CHECK_HEADERS(ffmpeg/swscale.h libswscale/swscale.h)
         VLC_ADD_LIBS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL])
       LDFLAGS="${LDFLAGS_save}"
       CPPFLAGS="${CPPFLAGS_save}"
index 29a1a8d13a12cd347791669ca996e19c520ce5e9..2c5d41e45f3c951622af8e2d753c25155056ccc0 100644 (file)
 #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
index 38b472bc469f44ce717a00f4dfdf7fd7e62199f5..0a95268736a878de148513325a267f9eec1a6abc 100644 (file)
@@ -464,10 +464,9 @@ if(FFmpeg_FOUND)
   set( CMAKE_REQUIRED_FLAGS_saved ${CMAKE_REQUIRED_FLAGS} )
   set( CMAKE_REQUIRED_FLAGS ${FFmpeg_CFLAGS} )
 
-  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)
+  vlc_check_include_files (ffmpeg/avcodec.h libavcodec/avcodec.h)
+  vlc_check_include_files (ffmpeg/avutil.h libavutil/avutil.h)
+  vlc_check_include_files (ffmpeg/swscale.h libswscale/swscale.h)
   
   check_include_files ("stdint.h;postproc/postprocess.h" HAVE_POSTPROC_POSTPROCESS_H)
   vlc_enable_modules(ffmpeg)
index 9bc9cef9e6ae38b360d48b2b6722938e563d0033..4731854d2783115add30c6d4b0060dc9fed0c457 100644 (file)
@@ -35,7 +35,9 @@
 #include <vlc_input.h>
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
index 66e6ff405b6bd897605e4f581940304aa041141b..ede4bf8f51f9dd4d11a4530ce1798324b36d6c35 100644 (file)
 #include <vlc/vlc.h>
 #include <vlc_vout.h>
 
-#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
+#if defined(HAVE_LIBSWSCALE_SWSCALE_H)  || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
 #include <vlc_filter.h>
 #endif
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
@@ -45,7 +47,7 @@
 
 #include "ffmpeg.h"
 
-#if !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE)
+#if !defined(HAVE_LIBSWSCALE_SWSCALE_H)  && !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 * );
 
@@ -361,4 +363,4 @@ void E_(CloseChroma)( vlc_object_t *p_this )
     free( p_vout->chroma.p_sys );
 }
 
-#endif /* !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */
+#endif /* !defined(HAVE_LIBSWSCALE_SWSCALE_H)  && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */
index db46f77a950a3bd39ae097009ad2c37a9d642e94..3fc6f38450a0e1043549aef4432749e5226167d0 100644 (file)
@@ -35,7 +35,9 @@
 #include <vlc_filter.h>
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
index 07f948cee80a7c6d4d2c113139da44f2b37be724..70cf1ba09feb749aef62ad9c1559a3e39de4eeee 100644 (file)
@@ -36,7 +36,9 @@
 #include <vlc_meta.h>
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVFORMAT_H
+#if defined(HAVE_LIBAVFORMAT_AVFORMAT_H)
+#   include <libavformat/avformat.h>
+#elif defined(HAVE_FFMPEG_AVFORMAT_H)
 #   include <ffmpeg/avformat.h>
 #elif defined(HAVE_LIBAVFORMAT_TREE)
 #   include <avformat.h>
@@ -47,7 +49,7 @@
 //#define AVFORMAT_DEBUG 1
 
 /* Version checking */
-#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
+#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_LIBSWSCALE_SWSCALE_H)  || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
 
 /*****************************************************************************
  * demux_sys_t: demux descriptor
@@ -501,4 +503,4 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence )
     return stream_Tell( p_demux->s );
 }
 
-#endif /* HAVE_FFMPEG_AVFORMAT_H */
+#endif /* HAVE_LIBAVFORMAT_AVFORMAT_H */
index c0ec8c827f75d81366b832876c2847c6960bdb91..ce5db9e055c46e05d7ef41c69be5dc69585c45b8 100644 (file)
@@ -41,7 +41,9 @@
 
 /* ffmpeg header */
 #define HAVE_MMX 1
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
index 541124c319b92ed55cb186b42e82043a309443dc..a9a7a4728ab6c2df3a61bfe57786a42865140e0b 100644 (file)
@@ -34,7 +34,9 @@
 
 /* ffmpeg header */
 #define HAVE_MMX 1
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
@@ -74,7 +76,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_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
+#if defined(HAVE_LIBSWSCALE_SWSCALE_H)  || 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)"),
@@ -196,7 +198,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_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
+#if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
     /* demux submodule */
     add_submodule();
     set_description( _("FFmpeg demuxer" ) );
@@ -212,7 +214,7 @@ vlc_module_begin();
     set_callbacks( E_(OpenMux), E_(CloseMux) );
 #endif
 
-#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
+#if defined(HAVE_LIBSWSCALE_SWSCALE_H)  || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)
     /* video filter submodule */
     add_submodule();
     set_description( _("Video scaling filter") );
index 07b8a99f7aeecc9b4aaf26c6a4b93e922a2079d2..99c866213cc48750dd693be5eec0a5fec6ac6fd9 100644 (file)
@@ -34,7 +34,9 @@
 #include <vlc_sout.h>
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVFORMAT_H
+#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
+#   include <libavformat/avformat.h>
+#elif defined(HAVE_FFMPEG_AVFORMAT_H)
 #   include <ffmpeg/avformat.h>
 #elif defined(HAVE_LIBAVFORMAT_TREE)
 #   include <avformat.h>
@@ -45,7 +47,7 @@
 //#define AVFORMAT_DEBUG 1
 
 /* Version checking */
-#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
+#if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE)
 
 static const char *ppsz_mux_options[] = {
     "mux", NULL
index c5da8e27bc6e5fe7a62359c0d22437f70136e2b7..7a8958d3e5f4b1fb722500dd08658ee68a599563 100644 (file)
@@ -31,7 +31,9 @@
 #include <vlc_codec.h>
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
index b238bf8d63e1087daadf0fcbc98222d00ca2e238..b7e622f014fa0657d6453317d243228b0f00fbbe 100644 (file)
 #include <vlc_filter.h>
 
 /* ffmpeg headers */
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
 #endif
 
-#ifdef HAVE_FFMPEG_SWSCALE_H
+#ifdef HAVE_LIBSWSCALE_SWSCALE_H
+#   include <libswscale/swscale.h>
+#elif defined(HAVE_FFMPEG_SWSCALE_H)
 #   include <ffmpeg/swscale.h>
 #elif defined(HAVE_LIBSWSCALE_TREE)
 #   include <swscale.h>
@@ -49,7 +53,7 @@
 #include "ffmpeg.h"
 
 /* Version checking */
-#if ( (defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) )
+#if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H)  || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) )
 
 /*****************************************************************************
  * filter_sys_t : filter descriptor
index 5afef13d85741151160687824785c75c78d82cdc..9ae5fa4452acba9cb36bae9eb19390bbd1b1cfef 100644 (file)
@@ -35,7 +35,9 @@
 #include <vlc_input.h>                  /* hmmm, just for INPUT_RATE_DEFAULT */
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
@@ -843,7 +845,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_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE)
+#if !defined(HAVE_LIBSWSCALE_SWSCALE_H)  && !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,
index 886e95777f655f537aa86f1ee6b6ca88287f223b..524d8957ca90dc6f24e4e2bc9f36f943302be966 100644 (file)
@@ -35,7 +35,9 @@
 #include <vlc_filter.h>
 
 /* ffmpeg header */
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
@@ -43,7 +45,7 @@
 
 #include "ffmpeg.h"
 
-#if !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE)
+#if !defined(HAVE_LIBSWSCALE_SWSCALE_H)  && !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 );
@@ -566,4 +568,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_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) */
+#endif /* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H)  || defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_TREE)) */
index 30fc6d5bf111a7221d29174af914cac5ca9715d3..a9a560175ad253447794ee202527b32f54efa113 100644 (file)
@@ -136,7 +136,7 @@ struct decoder_sys_t
     int                     i_align;
 
     /* Misc */
-#ifdef HAVE_FFMPEG_SWSCALE_H
+#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_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) );
 
-#ifdef HAVE_FFMPEG_SWSCALE_H
+#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_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
-#ifdef HAVE_FFMPEG_SWSCALE_H
+#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_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 );
 
-#ifdef HAVE_FFMPEG_SWSCALE_H
+#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_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') :
-#ifdef HAVE_FFMPEG_SWSCALE_H
+#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_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
     {
-#ifdef HAVE_FFMPEG_SWSCALE_H
+#if defined(HAVE_FFMPEG_SWSCALE_H) || defined(HAVE_LIBSWSCALE_SWSCALE_H)
         video_format_t fmt_in;
         picture_t *p_pic, *p_dest;
 
index 901d138f14193216d586b163c793220907af58bd..e29e3470f5e2f52fc6f2df20e4d40719cfc3c0be 100644 (file)
@@ -38,7 +38,9 @@
 #include <vlc_network.h>
 
 #define HAVE_MMX
-#ifdef HAVE_FFMPEG_AVCODEC_H
+#ifdef HAVE_LIBAVCODEC_AVCODEC_H
+#   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>