diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | src/libxinevdec/image.c | 17 |
3 files changed, 37 insertions, 12 deletions
@@ -1,3 +1,7 @@ +xine-lib (1.1.20.1) 2011-??-?? + * Various bug fixes. + * Use the current ImageMagick API (if using ImageMagick). + xine-lib (1.1.20) 2011-11-13 * Imagine that there's a large poppy here. * Ensure that file and socket descriptors are marked as CLOEXEC. diff --git a/configure.ac b/configure.ac index 6af7ef7c1..f18288691 100644 --- a/configure.ac +++ b/configure.ac @@ -372,14 +372,7 @@ if test "x$with_external_ffmpeg" != "xno"; then AC_MSG_RESULT([using external ffmpeg]) else - AC_MSG_NOTICE([ -********************************************************************* -xine-lib is configured to use internal ffmpeg. - -This copy of ffmpeg is old. You are strongly advised to install a -newer version (including development files) and to reconfigure -xine-lib to use it. -*********************************************************************]) + AC_MSG_RESULT([using internal ffmpeg - NOT RECOMMENDED OR SUPPORTED]) LIBFFMPEG_CPPFLAGS="-DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DXINE_MPEG_ENCODER -D_ISOC9X_SOURCE -DCONFIG_DECODERS" AC_CHECK_TYPES(int_fast8_t, [], [LIBFFMPEG_CPPFLAGS="$LIBFFMPEG_CPPFLAGS -DEMULATE_FAST_INT"]) AC_SUBST([LIBFFMPEG_CPPFLAGS]) @@ -1433,11 +1426,12 @@ if test "x$with_imagemagick" != "xno"; then dnl the flags for plain GraphicsMagick WAND_CFLAGS="$GRAPHICSMAGICKWAND_CFLAGS" WAND_LIBS="$GRAPHICSMAGICKWAND_LIBS" + AC_DEFINE([HAVE_GRAPHICSMAGICK], [1], [Define this if you have GraphicsMagick installed]) fi if test "x$with_imagemagick" = "xyes" && test "x$have_imagemagick" = "xno"; then AC_MSG_ERROR([ImageMagick support requested, but neither Wand, MagickWand, nor GraphicsMagick were found]) elif test "x$have_imagemagick" = "xyes"; then - AC_DEFINE([HAVE_WAND], [1], [Define this if you have ImageMagick installed]) + AC_DEFINE([HAVE_WAND], [1], [Define this if you have ImageMagick or GraphicsMagick's compat layer installed]) fi fi @@ -1773,6 +1767,7 @@ if test "x$external_dvdnav" = "xyes"; then AM_PATH_DVDNAV(0.1.9, AC_DEFINE(HAVE_DVDNAV,1,[Define this if you have a suitable version of libdvdnav]), [AC_MSG_RESULT([*** no usable version of libdvdnav found, using internal copy ***])]) + AC_CHECK_LIB(dvdread, navRead_DSI, DVDNAV_LIBS="$DVDNAV_LIBS -ldvdread",) else AC_MSG_RESULT([Use included DVDNAV support]) fi @@ -3367,3 +3362,18 @@ if test "x$no_x" = "xyes"; then ;; esac fi + +dnl warn if internal ffmpeg is being used +if test "x$with_external_ffmpeg" = "xno"; then + AC_MSG_NOTICE([ +********************************************************************* +xine-lib is configured to use internal ffmpeg. + +This copy of ffmpeg is old and has known security problems. +Don't use it. We don't want you to. We only care that xine-lib is +compilable with it; beyond that, you're completely on your own. + +You are STRONGLY advised to install a newer version (including +development files) and to reconfigure xine-lib to use it. +*********************************************************************]) +fi diff --git a/src/libxinevdec/image.c b/src/libxinevdec/image.c index d8064d200..5e166382b 100644 --- a/src/libxinevdec/image.c +++ b/src/libxinevdec/image.c @@ -54,6 +54,17 @@ #include "xineutils.h" #include "bswap.h" +#ifdef HAVE_GRAPHICSMAGICK +# define MAGICK_VERSION 0x670 +#else +# if !defined(MagickLibVersion) || MagickLibVersion < 0x671 +# define MAGICK_VERSION 0x670 +#else +# define MAGICK_VERSION MagickLibVersion +# endif +#endif + + typedef struct { video_decoder_class_t decoder_class; @@ -101,7 +112,7 @@ static void image_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { /* * this->image -> rgb data */ -#if !defined(MagickLibVersion) || MagickLibVersion < 0x671 +#if MAGICK_VERSION < 0x671 InitializeMagick(NULL); #else MagickWandGenesis(); @@ -113,7 +124,7 @@ static void image_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { if (!status) { DestroyMagickWand(wand); -#if !defined(MagickLibVersion) || MagickLibVersion < 0x671 +#if MAGICK_VERSION < 0x671 DestroyMagick(); #else MagickWandTerminus(); @@ -125,7 +136,7 @@ static void image_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { width = MagickGetImageWidth(wand) & ~1; /* must be even for init_yuv_planes */ height = MagickGetImageHeight(wand); img_buf = malloc(width * height * 3); -#if !defined(MagickLibVersion) || MagickLibVersion < 0x671 +#if MAGICK_VERSION < 0x671 MagickGetImagePixels(wand, 0, 0, width, height, "RGB", CharPixel, img_buf); DestroyMagickWand(wand); DestroyMagick(); |