]> git.sesse.net Git - vlc/blobdiff - modules/codec/ffmpeg/chroma.c
Detect and allow older versions of ffmpeg to be used in conjunction with VLC.
[vlc] / modules / codec / ffmpeg / chroma.c
index 9104c5af64ce32289d9d2bbf3d3887dddc56e98c..50b16bcf6b2022cf9e454f74ec536ef94b4ed413 100644 (file)
 #include <vlc/vlc.h>
 #include <vlc_vout.h>
 
-#if defined(HAVE_LIBSWSCALE_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_LIBAVCODEC_AVCODEC_H
+#if defined(HAVE_LIBAVCODEC_AVCODEC_H)
 #   include <libavcodec/avcodec.h>
+#elif defined(HAVE_FFMPEG_AVCODEC_H)
+#   include <ffmpeg/avcodec.h>
 #else
 #   include <avcodec.h>
 #endif
 
 #include "ffmpeg.h"
 
-#if !defined(HAVE_LIBSWSCALE_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_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */
+#endif /* !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) && !defined(HAVE_LIBSWSCALE_TREE) */