diff options
author | Brad Smith <brad@comstyle.com> | 2011-05-17 02:05:22 +0000 |
---|---|---|
committer | Brad Smith <brad@comstyle.com> | 2011-05-17 02:05:22 +0000 |
commit | 597429a7d24b55dec3570598f9509e8aa635cf04 (patch) | |
tree | f18d59929cf936207b2687ee29162ce13f25488e | |
parent | f5e7f8e8d41fd9fa6f8e3fdc7930134eef9855a3 (diff) | |
download | xine-lib-597429a7d24b55dec3570598f9509e8aa635cf04.tar.gz xine-lib-597429a7d24b55dec3570598f9509e8aa635cf04.tar.bz2 |
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.
-rw-r--r-- | m4/decoders.m4 | 2 | ||||
-rw-r--r-- | 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 <sha1.h> #else # include <libavutil/base64.h> -# ifdef HAVE_LIBAVUTIL_SHA1_H -# include <libavutil/sha1.h> -# else +# ifdef HAVE_LIBAVUTIL_SHA_H # include <libavutil/sha.h> +# else +# include <libavutil/sha1.h> # 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) |