summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/libffmpeg/Makefile.am2
-rw-r--r--src/libffmpeg/ff_dvaudio_decoder.c8
-rw-r--r--src/libffmpeg/ff_video_decoder.c4
-rw-r--r--src/libffmpeg/ffmpeg_decoder.h4
5 files changed, 14 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 90a5f1b80..0ecd5ab75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -350,6 +350,10 @@ if test "x$with_external_ffmpeg" = "xyes"; then
AC_SUBST([FFMPEG_POSTPROC_CFLAGS])
AC_SUBST([FFMPEG_POSTPROC_LIBS])
AC_DEFINE([HAVE_FFMPEG], [1], [Define this if you have ffmpeg library])
+
+ dnl Check presence of ffmpeg/avutil.h to see if it's old or new
+ dnl style for headers. The new style would be preferred actually...
+ AC_CHECK_HEADER([ffmpeg/avutil.h])
AC_MSG_NOTICE([
*********************************************************************
diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am
index 61acdd0d1..96d269278 100644
--- a/src/libffmpeg/Makefile.am
+++ b/src/libffmpeg/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
+DEFAULT_INCLUDES = -I.
+
if HAVE_FFMPEG
AM_CFLAGS = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS)
diff --git a/src/libffmpeg/ff_dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c
index 0796b3862..a394e6615 100644
--- a/src/libffmpeg/ff_dvaudio_decoder.c
+++ b/src/libffmpeg/ff_dvaudio_decoder.c
@@ -52,14 +52,14 @@
# undef uint64_t
#endif
-#ifdef HAVE_FFMPEG
+#ifdef HAVE_FFMPEG_AVCODEC_H
# include <avcodec.h>
-# include "libavcodec/dvdata.h"
#else
-# include "libavcodec/avcodec.h"
-# include "libavcodec/dvdata.h"
+# include <libavcodec/avcodec.h>
#endif
+#include "libavcodec/dvdata.h"
+
#ifdef _MSC_VER
# undef malloc
# undef free
diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c
index dc07abb9f..d1d69416e 100644
--- a/src/libffmpeg/ff_video_decoder.c
+++ b/src/libffmpeg/ff_video_decoder.c
@@ -45,10 +45,10 @@
#include "ffmpeg_decoder.h"
#include "ff_mpeg_parser.h"
-#ifdef HAVE_FFMPEG
+#ifdef HAVE_FFMPEG_AVCODEC_H
# include <postprocess.h>
#else
-# include "libavcodec/libpostproc/postprocess.h"
+# include <libpostproc/postprocess.h>
#endif
#define VIDEOBUFSIZE (128*1024)
diff --git a/src/libffmpeg/ffmpeg_decoder.h b/src/libffmpeg/ffmpeg_decoder.h
index 14788cf29..adf0908dd 100644
--- a/src/libffmpeg/ffmpeg_decoder.h
+++ b/src/libffmpeg/ffmpeg_decoder.h
@@ -25,10 +25,10 @@
#include "config.h"
#endif
-#ifdef HAVE_FFMPEG
+#ifdef HAVE_FFMPEG_AVCODEC_H
# include <avcodec.h>
#else
-# include "libavcodec/avcodec.h"
+# include <libavcodec/avcodec.h>
#endif
typedef struct ff_codec_s {