Index: xdtv-2.4.0/configure.in =================================================================== --- xdtv-2.4.0.orig/configure.in +++ xdtv-2.4.0/configure.in @@ -1035,6 +1035,11 @@ if test "x$enable_ffmpeg" != "xno"; then if test "x$with_external_ffmpeg" = "xyes"; then PKG_CHECK_MODULES([FFMPEG], [libavcodec libavformat], enable_ffmpeg=yes, enable_ffmpeg=no) + 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([ffmpeg/swscale.h libswscale/swscale.h]) + if test "x$enable_ffmpeg" = "xyes"; then echo "*** A modern and external ffmpeg library was found: we use it ***" Index: xdtv-2.4.0/src/container-ffmpeg.c =================================================================== --- xdtv-2.4.0.orig/src/container-ffmpeg.c +++ xdtv-2.4.0/src/container-ffmpeg.c @@ -23,8 +23,16 @@ #ifdef HAVE_FFMPEG #if LIBAVCODEC_BUILD >= 4754 +#if HAVE_LIBAVCODEC_AVCODEC_H +#include +#else # include "avcodec.h" +#endif +#if HAVE_LIBAVFORMAT_AVFORMAT_H +#include +#else # include "avformat.h" +#endif static AVOutputFormat *av_output_fmt = NULL; static AVFormatContext *oc=NULL; Index: xdtv-2.4.0/src/container.h =================================================================== --- xdtv-2.4.0.orig/src/container.h +++ xdtv-2.4.0/src/container.h @@ -14,8 +14,12 @@ #include "strtab.h" #ifdef HAVE_FFMPEG +#if HAVE_LIBAVCODEC_AVCODEC_H +# include +#else # include "avcodec.h" #endif +#endif enum { AVI_BUILTIN, Index: xdtv-2.4.0/src/divx.h =================================================================== --- xdtv-2.4.0.orig/src/divx.h +++ xdtv-2.4.0/src/divx.h @@ -31,11 +31,19 @@ #include "container.h" #ifdef HAVE_FFMPEG +#if HAVE_LIBAVCODEC_AVCODEC_H +#include +#else # include "avcodec.h" +#endif #if LIBAVCODEC_BUILD >= 4754 +#if HAVE_LIBAVFORMAT_AVFORMAT_H +#include +#else # include "avformat.h" #endif #endif +#endif #ifdef HAVE_XVID # include