From 597429a7d24b55dec3570598f9509e8aa635cf04 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 17 May 2011 02:05:22 +0000 Subject: Fix build with relatively recent copies of FFmpeg Relatively recent copies of FFmpeg before the major API clean up have both the old SHA1 API and the new SHA (1/2) API so the recently added autoconf check will reject perfectly valid copies of FFmpeg. Also tweak the input_cdda code to make sure to use the new API and not include the compat macros if both the old and new API are around. --- m4/decoders.m4 | 2 +- src/input/input_cdda.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 38a4b59b3..f1d9a9403 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -96,7 +96,7 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [ AC_CHECK_HEADERS([libavutil/avutil.h]) AC_CHECK_HEADERS([libavutil/sha1.h]) AC_CHECK_HEADERS([libavutil/sha.h]) - if test "$ac_cv_header_ffmpeg_avutil_h$ac_cv_header_libavutil_avutil_h" = "yesyes" || test "$ac_cv_header_libavutil_sha1_h$ac_cv_header_libavutil_sha_h" = "yesyes"; then + if test "$ac_cv_header_ffmpeg_avutil_h" = "yes" && test "$ac_cv_header_libavutil_avutil_h" = "yes"; then AC_MSG_ERROR([old & new ffmpeg headers found - you need to clean up!]) fi diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 53733fddf..2cc2bd49d 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -64,10 +64,10 @@ # include #else # include -# ifdef HAVE_LIBAVUTIL_SHA1_H -# include -# else +# ifdef HAVE_LIBAVUTIL_SHA_H # include +# else +# include # endif #endif @@ -104,7 +104,7 @@ #define CD_LEADOUT_TRACK 0xAA #define CD_BLOCK_OFFSET 150 -#ifdef HAVE_LIBAVUTIL_SHA1_H +#if defined(HAVE_LIBAVUTIL_SHA1_H) && !defined(HAVE_LIBAVUTIL_SHA_H) /* old libavutil/sha1.h was found... */ #define AVSHA AVSHA1 # define av_sha_init(c,b) av_sha1_init(c) -- cgit v1.2.3