summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2012-06-05 12:47:26 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2012-06-05 12:47:26 +0300
commitb631217b97e6e63807a2e7195658d12de0236f58 (patch)
treeb478fb90aedd7925769e8a0b2887c0aa9734786e
parent4e1f6c532f001e0aebc11738cb1ff2c70a1f4472 (diff)
parent8ef238a8cc53fe097808e79de0682b140ff07057 (diff)
downloadxine-lib-b631217b97e6e63807a2e7195658d12de0236f58.tar.gz
xine-lib-b631217b97e6e63807a2e7195658d12de0236f58.tar.bz2
Merge from 1.1
-rw-r--r--configure.ac4
-rw-r--r--m4/attributes.m42
-rw-r--r--m4/pthreads.m42
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c15
-rw-r--r--src/combined/ffmpeg/ffmpeg_compat.h13
-rw-r--r--src/xine-engine/Makefile.am4
-rw-r--r--src/xine-utils/utils.c4
7 files changed, 30 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 653d42b3e..ae28d9310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -543,7 +543,6 @@ case "$host_or_hostalias" in
AC_CHECK_LIB(iberty, strncomp, [GOOM_LIBS="-liberty"])
AC_SUBST(GOOM_LIBS)
fi
- LDFLAGS="-no-undefined $LDFLAGS"
;;
*)
@@ -728,9 +727,6 @@ case "$host_or_hostalias" in
CC_CHECK_CFLAGS([-fno-inline-functions], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-inline-functions"])
CC_CHECK_CFLAGS([-fno-rename-registers], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-rename-registers"])
AC_SUBST(W32_NO_OPTIMIZE)
- case "$host_or_hostalias" in
- *-*-cygwin*) LIBS="$LIBS @INTLLIBS@ -lkernel32" ;;
- esac
;;
esac
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index 4e613f23a..9ad27b98b 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -114,7 +114,7 @@ AC_DEFUN([CC_NOUNDEFINED], [
dnl use it only for libraries in mingw32-w64
*-freebsd* | *-openbsd*) ;;
- *-mingw*)
+ *-mingw* | *-cygwin*)
LDFLAGS_NOUNDEFINED="-no-undefined"
;;
*)
diff --git a/m4/pthreads.m4 b/m4/pthreads.m4
index 6cbed9255..06a046a76 100644
--- a/m4/pthreads.m4
+++ b/m4/pthreads.m4
@@ -19,6 +19,7 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
if test "${PTHREAD_CFLAGS-unset}" = "unset"; then
case $host in
*-mingw*) PTHREAD_CFLAGS="" ;;
+ *-cygwin*) PTHREAD_CFLAGS="" ;;
*-hpux11*) PTHREAD_CFLAGS="" ;;
*-darwin*) PTHREAD_CFLAGS="" ;;
*-solaris*|*-linux-gnu)
@@ -31,6 +32,7 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
if test "${PTHREAD_LIBS-unset}" = "unset"; then
case $host in
*-mingw*) PTHREAD_LIBS="-lpthreadGC2" ;;
+ *-cygwin*) PTHREAD_LIBS="-lpthread" ;;
*-hpux11*) PTHREAD_LIBS="-lpthread" ;;
*-darwin*) PTHREAD_LIBS="" ;;
*-solaris*)
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index 4a0fd57dc..ca3e488fa 100644
--- a/src/combined/ffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -143,12 +143,20 @@ struct ff_video_decoder_s {
static void ff_check_colorspace (ff_video_decoder_t *this) {
int i, cm;
+#ifdef AVCODEC_HAS_COLORSPACE
cm = this->context->colorspace << 1;
+#else
+ cm = 0;
+#endif
+
/* ffmpeg bug: color_range not set by svq3 decoder */
i = this->context->pix_fmt;
- if (cm && ((i == PIX_FMT_YUVJ420P) || (i == PIX_FMT_YUVJ444P) ||
- (this->context->color_range == AVCOL_RANGE_JPEG)))
+ if (cm && ((i == PIX_FMT_YUVJ420P) || (i == PIX_FMT_YUVJ444P)))
+ cm |= 1;
+#ifdef AVCODEC_HAS_COLORSPACE
+ if (this->context->color_range == AVCOL_RANGE_JPEG)
cm |= 1;
+#endif
/* report changes of colorspyce and/or color range */
if (cm != this->color_matrix) {
@@ -460,9 +468,10 @@ static void init_video_codec (ff_video_decoder_t *this, unsigned int codec_type)
break;
}
+#ifdef AVCODEC_HAS_REORDERED_OPAQUE
/* dont want initial AV_NOPTS_VALUE here */
this->context->reordered_opaque = 0;
-
+#endif
}
static void choose_speed_over_accuracy_cb(void *user_data, xine_cfg_entry_t *entry) {
diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h
index 69b9aa30e..f025dfec6 100644
--- a/src/combined/ffmpeg/ffmpeg_compat.h
+++ b/src/combined/ffmpeg/ffmpeg_compat.h
@@ -24,10 +24,14 @@
#define XINE_AVCODEC_COMPAT_H
#ifndef LIBAVCODEC_VERSION_MAJOR
-# error ffmpeg headers must be included first !
+# ifdef LIBAVCODEC_VERSION_INT
+# define LIBAVCODEC_VERSION_MAJOR ((LIBAVCODEC_VERSION_INT)>>16)
+# define LIBAVCODEC_VERSION_MINOR (((LIBAVCODEC_VERSION_INT)>>8) & 0xff)
+# else
+# error ffmpeg headers must be included first !
+# endif
#endif
-
#if LIBAVCODEC_VERSION_MAJOR > 51
# define bits_per_sample bits_per_coded_sample
#endif
@@ -44,6 +48,11 @@
# undef AVCODEC_HAS_REORDERED_OPAQUE
#endif
+/* colorspace and color_range were added before 52.29.0 */
+#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 29)
+# define AVCODEC_HAS_COLORSPACE
+#endif
+
/**/
#if LIBAVCODEC_VERSION_MAJOR > 53 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 8)
# define avcodec_init() do {} while(0)
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index 616da19a5..f7a932096 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -15,7 +15,7 @@ EXTRA_DIST = lrb.c lrb.h accel_vdpau.h accel_xvmc.h
if WIN32
DEF_FILE = libxine-$(XINE_MAJOR).def
-def_ldflags=-Wl,--output-def,$(DEF_FILE) $(LDFLAGS_NOUNDEFINED)
+def_ldflags=-Wl,--output-def,$(DEF_FILE)
else
DEF_FILE =
endif
@@ -45,7 +45,7 @@ libxine_la_LIBADD = $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) $(ZLIB_LIBS)
$(LIBXINEPOSIX) $(RT_LIBS) $(NET_LIBS) $(XDG_BASEDIR_LIBS) \
$(AVUTIL_LIBS)
-libxine_la_LDFLAGS = $(AM_LDFLAGS) $(def_ldflags) $(GCSECTIONS) \
+libxine_la_LDFLAGS = $(LDFLAGS_NOUNDEFINED) $(AM_LDFLAGS) $(def_ldflags) $(GCSECTIONS) \
-weak libxine-interface.la \
-version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE)
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index e2aac22f5..1ca5f4d47 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -41,6 +41,7 @@
#include <time.h>
#include <unistd.h>
#include <fcntl.h>
+#include <ctype.h>
#include <sys/socket.h>
#if HAVE_EXECINFO_H
@@ -55,8 +56,7 @@
#include <langinfo.h>
#endif
-#if defined(__CYGWIN__) || defined(WIN32)
-#include <ctype.h>
+#if defined(WIN32)
#include <windows.h>
#endif