summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-07-03 16:56:44 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-07-03 16:56:44 +0100
commitb70e34352e304cf03da32b688d84eec3c3ffacec (patch)
tree711ec8d7abc0dd6075d09085634e5a5432e40ee3
parent08ad733e0103834bc61831ddce5a75c3f62e0173 (diff)
parent2b0e330c2642081066316ca5ec9965912cd248de (diff)
downloadxine-lib-b70e34352e304cf03da32b688d84eec3c3ffacec.tar.gz
xine-lib-b70e34352e304cf03da32b688d84eec3c3ffacec.tar.bz2
Merge from 1.1.
-rw-r--r--.hgtags1
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac2
-rw-r--r--debian/changelog4
-rw-r--r--debian/control1
-rw-r--r--lib/os_internal.h7
-rw-r--r--lib/strcasestr.c60
-rw-r--r--m4/pthreads.m46
-rw-r--r--src/demuxers/asfheader.c59
-rw-r--r--src/demuxers/asfheader.h1
-rw-r--r--src/demuxers/demux_asf.c8
-rw-r--r--src/input/input_v4l.c3
-rw-r--r--src/post/planar/Makefile.am2
-rw-r--r--src/xine-engine/Makefile.am4
-rw-r--r--src/xine-utils/Makefile.am2
15 files changed, 153 insertions, 12 deletions
diff --git a/.hgtags b/.hgtags
index 5c57d5016..3cd170e68 100644
--- a/.hgtags
+++ b/.hgtags
@@ -75,3 +75,4 @@ ffe7962edb79c2ed967b82a82ccfb2ac7eb148a2 vdr-xine-version-802
2a2cc543b27b64a6587dfaef4f1d986eb2f2710a xine-lib-1_1_11_1-release
66e1654718fb0581846d60c60bc09ae3b6b8c0cf xine-lib-1_1_12-release
492f87e6963a8d244df32c40d66a6349aabc4420 xine-lib-1_1_13-release
+9b383441a18fb49ccd5a07465d3e3db8821cccf6 xine-lib-1_1_14-release
diff --git a/ChangeLog b/ChangeLog
index f9f93072c..6596cc45a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,7 +68,10 @@ xine-lib (1.1.90) (Unreleased)
* Report more video output capabilities via (port)->get_capabilities():
colour controls, zooming, colour keying.
-xine-lib (1.1.14) 2008-??-??
+xine-lib (1.1.15) 2008-??-??
+ * V4L: Don't segfault if asked for an input that doesn't exist
+
+xine-lib (1.1.14) 2008-06-29
* DVB changes:
- Reacquire PIDs whenever a PMT is parsed. (Some channels' PIDs are
changed on a regular basis.)
diff --git a/configure.ac b/configure.ac
index 0124db4f8..f5b19996f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -889,7 +889,7 @@ AC_CHECK_FUNCS([strncasecmp _strnicmp], [have_required_function="yes"])
AC_FUNC_FSEEKO
-AC_REPLACE_FUNCS([asprintf basename gettimeofday setenv strndup strpbrk strsep strtok_r timegm unsetenv memmem])
+AC_REPLACE_FUNCS([asprintf basename gettimeofday setenv strcasestr strndup strpbrk strsep strtok_r timegm unsetenv memmem])
AC_LIBSOURCE([hstrerror.c])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[hstrerror(0)]])],
diff --git a/debian/changelog b/debian/changelog
index 41e87bed1..8e4eb98a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,7 +5,7 @@ xine-lib-1.2 (1.2.0~hg-0) experimental; urgency=low
-- Darren Salt <linux@youmustbejoking.demon.co.uk> Tue, 17 Apr 2007 16:50:37 +0100
-xine-lib (1.1.13~hg-0) unstable; urgency=low
+xine-lib (1.1.14~hg-0) unstable; urgency=low
[ Darren Salt ]
* Hg snapshot.
@@ -14,7 +14,7 @@ xine-lib (1.1.13~hg-0) unstable; urgency=low
* remove gs from build-dependencies
* change the maintainer field to xine-devel@lists.sourceforge.net.
- -- Darren Salt <linux@youmustbejoking.demon.co.uk> Tue, 08 Apr 2008 15:29:17 +0100
+ -- Darren Salt <linux@youmustbejoking.demon.co.uk> Thu, 26 Jun 2008 20:32:42 +0100
xine-lib (1.1.5~cvs-0) unstable; urgency=low
diff --git a/debian/control b/debian/control
index adefe91a3..08fd23f3d 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends: debhelper (>= 5.0.1), binutils (>= 2.12.90.0.9), pkg-config,
libxcb-shape0-dev | libxv-dev (<< 1:1.0.3),
libxinerama-dev, libxv-dev, libxvmc-dev, libxt-dev,
libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
+ libcam-dev [kfreebsd-i386 kfreebsd-amd64],
libaa1-dev, libcaca-dev, libmodplug-dev,
libjack-dev, libpulse-dev, libartsc0-dev,
libmagick9-dev | libmagick-dev |libmagickwand-dev,
diff --git a/lib/os_internal.h b/lib/os_internal.h
index 01b4a5349..eaf56adc3 100644
--- a/lib/os_internal.h
+++ b/lib/os_internal.h
@@ -129,6 +129,13 @@ const char *xine_private_hstrerror(int err);
int xine_private_setenv(const char *name, const char *value);
#endif
+/* replacement of strcasestr */
+#ifndef HAVE_STRCASESTR
+#define HAVE_STRCASESTR
+#define strcasestr(HAYSTACK, NEEDLE) xine_private_strcasestr((HAYSTACK), (NEEDLE))
+char *xine_private_strcasestr(const char *haystack, const char *needle);
+#endif
+
/* replacement of strtok_r */
#ifndef HAVE_STRTOK_R
#define HAVE_STRTOK_R
diff --git a/lib/strcasestr.c b/lib/strcasestr.c
new file mode 100644
index 000000000..0793319aa
--- /dev/null
+++ b/lib/strcasestr.c
@@ -0,0 +1,60 @@
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <assert.h>
+#include <ctype.h>
+#include <string.h>
+
+/*
+ * Find the first occurrence of find in s, ignore case.
+ */
+char *
+xine_private_strcasestr(const char *s, const char *find)
+{
+ char c, sc;
+ size_t len;
+
+ if ((c = *find++) != 0) {
+ c = tolower((unsigned char)c);
+ len = strlen(find);
+ do {
+ do {
+ if ((sc = *s++) == 0)
+ return (NULL);
+ } while ((char)tolower((unsigned char)sc) != c);
+ } while (strncasecmp(s, find, len) != 0);
+ s--;
+ }
+ return (char *)s;
+}
diff --git a/m4/pthreads.m4 b/m4/pthreads.m4
index 653a496da..8438cde0b 100644
--- a/m4/pthreads.m4
+++ b/m4/pthreads.m4
@@ -48,7 +48,6 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
[ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $cc_cv_werror $PTHREAD_CFLAGS"
-
LIBS="$LIBS $PTHREAD_LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -79,7 +78,9 @@ AC_DEFUN([CC_PTHREAD_RECURSIVE_MUTEX], [
AC_CACHE_CHECK(
[for recursive mutex support in pthread],
[cc_cv_pthread_recursive_mutex],
- [ac_save_LIBS="$LIBS"
+ [ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $cc_cv_werror $PTHREAD_CFLAGS"
LIBS="$LIBS $PTHREAD_LIBS"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
@@ -94,6 +95,7 @@ int main() {
],
[cc_cv_pthread_recursive_mutex=yes],
[cc_cv_pthread_recursive_mutex=no])
+ CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
])
diff --git a/src/demuxers/asfheader.c b/src/demuxers/asfheader.c
index 4992e2889..ebc739073 100644
--- a/src/demuxers/asfheader.c
+++ b/src/demuxers/asfheader.c
@@ -506,6 +506,61 @@ static int asf_header_parse_stream_bitrate_properties(asf_header_t *header_pub,
return 1;
}
+static int asf_header_parse_metadata(asf_header_t *header_pub, uint8_t *buffer, int buffer_len)
+{
+ asf_header_internal_t *header = (asf_header_internal_t *)header_pub;
+ asf_reader_t reader;
+ uint16_t i, records_count;
+ iconv_t iconv_cd;
+
+ if (buffer_len < 2)
+ return 0;
+
+ if ((iconv_cd = iconv_open ("UTF-8", "UCS-2LE")) == (iconv_t)-1)
+ return 0;
+
+ asf_reader_init(&reader, buffer, buffer_len);
+ asf_reader_get_16(&reader, &records_count);
+
+ for (i = 0; i < records_count; i++)
+ {
+ uint16_t index, stream, name_len = 0, data_type;
+ uint32_t data_len = 0;
+ int stream_id;
+
+ asf_reader_get_16 (&reader, &index);
+ asf_reader_get_16 (&reader, &stream);
+ stream &= 0x7f;
+ asf_reader_get_16 (&reader, &name_len);
+ asf_reader_get_16 (&reader, &data_type);
+ asf_reader_get_32 (&reader, &data_len);
+
+ stream_id = asf_header_get_stream_id (&header->pub, stream);
+
+ if (data_len >= 4)
+ {
+ char *name = asf_reader_get_string (&reader, name_len, iconv_cd);
+ if (!strcmp (name, "AspectRatioX"))
+ {
+ asf_reader_get_32 (&reader, &header->pub.aspect_ratios[stream_id].x);
+ data_len -= 4;
+ }
+ else if (!strcmp (name, "AspectRatioY"))
+ {
+ asf_reader_get_32 (&reader, &header->pub.aspect_ratios[stream_id].y);
+ data_len -= 4;
+ }
+ free (name);
+ asf_reader_skip (&reader, data_len);
+ }
+ else
+ asf_reader_skip (&reader, data_len + name_len);
+ }
+
+ iconv_close (iconv_cd);
+ return 1;
+}
+
static int asf_header_parse_header_extension(asf_header_t *header, uint8_t *buffer, int buffer_len) {
asf_reader_t reader;
@@ -544,12 +599,14 @@ static int asf_header_parse_header_extension(asf_header_t *header, uint8_t *buff
case GUID_EXTENDED_STREAM_PROPERTIES:
asf_header_parse_stream_extended_properties(header, asf_reader_get_buffer(&reader), object_data_length);
break;
+ case GUID_METADATA:
+ asf_header_parse_metadata(header, asf_reader_get_buffer(&reader), object_data_length);
+ break;
case GUID_ADVANCED_MUTUAL_EXCLUSION:
case GUID_GROUP_MUTUAL_EXCLUSION:
case GUID_STREAM_PRIORITIZATION:
case GUID_BANDWIDTH_SHARING:
case GUID_LANGUAGE_LIST:
- case GUID_METADATA:
case GUID_METADATA_LIBRARY:
case GUID_INDEX_PARAMETERS:
case GUID_MEDIA_OBJECT_INDEX_PARAMETERS:
diff --git a/src/demuxers/asfheader.h b/src/demuxers/asfheader.h
index b895a1817..265f0e643 100644
--- a/src/demuxers/asfheader.h
+++ b/src/demuxers/asfheader.h
@@ -320,6 +320,7 @@ struct asf_header_s {
asf_stream_t *streams[ASF_MAX_NUM_STREAMS];
asf_stream_extension_t *stream_extensions[ASF_MAX_NUM_STREAMS];
uint32_t bitrates[ASF_MAX_NUM_STREAMS];
+ struct { uint32_t x, y; } aspect_ratios[ASF_MAX_NUM_STREAMS];
};
struct asf_file_s {
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 406264558..e361579b0 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -351,6 +351,14 @@ static void asf_send_video_header (demux_asf_t *this, int stream) {
BUF_FLAG_FRAME_END;
buf->decoder_info[0] = 0;
+
+ if (this->asf_header->aspect_ratios[stream].x && this->asf_header->aspect_ratios[stream].y)
+ {
+ buf->decoder_flags |= BUF_FLAG_ASPECT;
+ buf->decoder_info[1] = bih->biWidth * this->asf_header->aspect_ratios[stream].x;
+ buf->decoder_info[2] = bih->biHeight * this->asf_header->aspect_ratios[stream].y;
+ }
+
buf->size = asf_stream->private_data_length - 11;
memcpy (buf->content, bih, buf->size);
buf->type = this->streams[stream].buf_type;
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index 302b96b57..93725167f 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -1629,7 +1629,8 @@ static void v4l_plugin_dispose (input_plugin_t *this_gen) {
data. */
free(this->audio_content_base);
free(this->video_content_base);
- free(this->frames_base->extra_info);
+ if (this->frames_base)
+ free(this->frames_base->extra_info);
free(this->frames_base);
#ifdef LOG
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am
index c9a36a001..99f8b14bd 100644
--- a/src/post/planar/Makefile.am
+++ b/src/post/planar/Makefile.am
@@ -14,5 +14,5 @@ xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \
denoise3d.c unsharp.c pp.c
xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(FFMPEG_POSTPROC_LIBS) -lm $(PTHREAD_LIBS) $(LTLIBINTL) $(noinst_LTLIBRARIES)
xineplug_post_planar_la_DEPS = $(FFMPEG_POSTPROC_DEPS)
-xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
+xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
xineplug_post_planar_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index e32f2d2f4..9c498ff84 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -2,8 +2,8 @@ include $(top_srcdir)/misc/Makefile.common
include $(top_srcdir)/lib/Makefile.common
AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) \
- $(AVUTIL_CFLAGS) $(VISIBILITY_FLAG)
-AM_CPPFLAGS = $(XDG_BASEDIR_CPPFLAGS) $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE
+ $(AVUTIL_CFLAGS) $(PTHREAD_CFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = $(XDG_BASEDIR_CPPFLAGS) $(ZLIB_CPPFLAGS) $(PTHREAD_CFLAGS) -DXINE_LIBRARY_COMPILE
XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la
diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am
index 9dd7f64d6..2088d0cae 100644
--- a/src/xine-utils/Makefile.am
+++ b/src/xine-utils/Makefile.am
@@ -1,7 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(VISIBILITY_FLAG)
-AM_CPPFLAGS = -DXINE_LIBRARY_COMPILE
+AM_CPPFLAGS = $(PTHREAD_CFLAGS) -DXINE_LIBRARY_COMPILE
EXTRA_DIST = ppcasm_string.S ppc_asm.tmpl