summaryrefslogtreecommitdiffstats
path: root/alsa-plugins/build/patches/alsa-plugins_ffmpeg_headers.patch
blob: 86026d48d54c49e389086ee67daed186256d4ed0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff -ru alsa-plugins-1.0.17.orig/a52/pcm_a52.c alsa-plugins-1.0.17/a52/pcm_a52.c
--- alsa-plugins-1.0.17.orig/a52/pcm_a52.c	2008-08-06 18:28:39.000000000 +0200
+++ alsa-plugins-1.0.17/a52/pcm_a52.c	2008-08-06 18:28:54.000000000 +0200
@@ -18,6 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #define __USE_XOPEN
@@ -25,7 +26,11 @@
 #include <alsa/asoundlib.h>
 #include <alsa/pcm_external.h>
 #include <alsa/pcm_plugin.h>
+#ifdef HAVE_FFMPEG_AVCODEC_H
 #include <ffmpeg/avcodec.h>
+#elif defined(HAVE_LIBAVCODEC_AVCODEC_H)
+#include <libavcodec/avcodec.h>
+#endif
 
 struct a52_ctx {
 	snd_pcm_ioplug_t io;
diff -ru alsa-plugins-1.0.17.orig/configure.in alsa-plugins-1.0.17/configure.in
--- alsa-plugins-1.0.17.orig/configure.in	2008-08-06 18:28:39.000000000 +0200
+++ alsa-plugins-1.0.17/configure.in	2008-08-06 18:31:00.000000000 +0200
@@ -77,7 +77,7 @@
 if test "x$enable_avcodec" != "xno"; then
 	AC_CHECK_LIB([avcodec], [avcodec_open], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no])
 	if test x$HAVE_AVCODEC = xyes; then
-	  AC_CHECK_HEADER([ffmpeg/avcodec.h], [], [HAVE_AVCODEC=no])
+	  AC_CHECK_HEADERS([ffmpeg/avcodec.h], , [AC_CHECK_HEADERS([libavcodec/avcodec.h], , [HAVE_AVCODEC=no])])
 	fi
 fi
 AM_CONDITIONAL(HAVE_AVCODEC, test x$HAVE_AVCODEC = xyes)
diff -ru alsa-plugins-1.0.17.orig/rate-lavc/rate_lavcrate.c alsa-plugins-1.0.17/rate-lavc/rate_lavcrate.c
--- alsa-plugins-1.0.17.orig/rate-lavc/rate_lavcrate.c	2008-08-06 18:28:39.000000000 +0200
+++ alsa-plugins-1.0.17/rate-lavc/rate_lavcrate.c	2008-08-06 18:28:54.000000000 +0200
@@ -16,10 +16,15 @@
  * Lesser General Public License for more details.
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <alsa/asoundlib.h>
 #include <alsa/pcm_rate.h>
+#ifdef HAVE_FFMPEG_AVCODEC_H
 #include <ffmpeg/avcodec.h>
+#elif defined(HAVE_LIBAVCODEC_AVCODEC_H)
+#include <libavcodec/avcodec.h>
+#endif
 #include "gcd.h"
 
 static int filter_size = 16;