summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-01-11 01:42:02 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-01-11 01:42:02 +0000
commit131182433db9769a79829507d584acf93a661f80 (patch)
tree393527585399677e47058800655ed5940f1393ee
parent2389267c73ec12bf71c501c354a0fbbd548489ed (diff)
parentf80db4ca6458e86b2db6f7e36bdefb89054dfd53 (diff)
downloadxine-lib-131182433db9769a79829507d584acf93a661f80.tar.gz
xine-lib-131182433db9769a79829507d584acf93a661f80.tar.bz2
Merge from 1.1, dropping the build fix for old libavcodec.
--HG-- rename : doc/faq/faq.sgml => doc/faq/faq.docbook
-rw-r--r--ChangeLog5
-rwxr-xr-xautogen.sh14
-rw-r--r--doc/faq/faq.docbook19
-rw-r--r--m4/video_out.m42
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c30
5 files changed, 45 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 159d05670..0a9fc277b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -69,6 +69,8 @@ xine-lib (1.1.90) (Unreleased)
colour controls, zooming, colour keying.
xine-lib (1.1.17) 2009-??-??
+ * Fix build with older ffmpeg, both internal and in Debian 5.0.
+ * Add version check for CACA library and disable CACA plugin if needed
xine-lib (1.1.16) 2009-01-07
* Security fixes:
@@ -76,7 +78,8 @@ xine-lib (1.1.16) 2009-01-07
- Multiple buffer overflows. (CVE-2008-5236)
- Multiple integer overflows. (CVE-2008-5237)
- Unchecked or incompletely-checked read function results. (CVE-2008-5239)
- - Unchecked malloc using untrusted values. (CVE-2008-5240)
+ - Unchecked malloc using untrusted values. (CVE-2008-5240, CVE-2008-5242)
+ - Integer underflow in qt compressed atom handling. (CVE-2008-5241)
- Buffer indexing using untrusted or unchecked values. (CVE-2008-5243)
- Integer overflows in the ffmpeg audio decoder and the CDDA server.
- Heap buffer overflow in the ffmpeg video decoder.
diff --git a/autogen.sh b/autogen.sh
index b1d0c43b6..f44cefcda 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -37,12 +37,13 @@ case `echo -n` in
*) _echo_n=-n _echo_c=;;
esac
+srcdir="`dirname "$0"`"
+
detect_configure_ac() {
- srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
- (test -f $srcdir/configure.ac) || {
+ (test -f "$srcdir"/configure.ac) || {
echo $_echo_n "*** Error ***: Directory "\`$srcdir\`" does not look like the"
echo " top-level directory"
exit 1
@@ -248,7 +249,11 @@ run_configure () {
echo " ** If you wish to pass arguments to ./configure, please"
echo " ** specify them on the command line."
fi
- ./configure "$@"
+ if test -f configure; then
+ ./configure "$@"
+ else
+ "$srcdir"/configure "$@"
+ fi
}
@@ -256,6 +261,7 @@ run_configure () {
# MAIN
#---------------
detect_configure_ac
+cd "$srcdir"
detect_autoconf
detect_libtool
detect_automake
@@ -295,6 +301,8 @@ case "$1" in
run_autoheader
run_automake
run_autoconf
+ # return to our original directory
+ cd - >/dev/null
run_configure "$@"
;;
esac
diff --git a/doc/faq/faq.docbook b/doc/faq/faq.docbook
index acbb4c016..21fd1adde 100644
--- a/doc/faq/faq.docbook
+++ b/doc/faq/faq.docbook
@@ -868,18 +868,13 @@
xine.
</para>
<para>
- Possibly the most convenient way to get the Real codecs is to download
- them from the MPlayer website
- <ulink url="http://www.mplayerhq.hu/design7/dload.html">
- http://www.mplayerhq.hu/design7/dload.html
- </ulink>.
- The package is called "essential". Unpack it and move everything you
- find inside to <filename>/usr/lib/codecs</filename> and set the
- <parameter>decoder.external.real_codecs_path</parameter> in your xine config file
- to <filename>/usr/lib/codecs</filename> (actually you can place them
- anywhere you want, e.g. someplace in your home directory, but then you'll
- have to set <parameter>decoder.external.real_codecs_path</parameter> accordingly).
- Restart xine then and you should be able to watch Real files/streams.
+ Possibly the most convenient way to get the Real codecs is to install
+ RealPlayer 9 or RealPlayer 10 and set the
+ <parameter>decoder.external.real_codecs_path</parameter> in your xine
+ config file to the name of the directory which contains the codecs
+ (look for drvc.so); it's probably something like
+ <filename>/opt/real/RealPlayer/codecs/</filename>. Restart xine then
+ and you should be able to watch Real files/streams.
</para>
</sect3>
<sect3 id="realnetworkstreams">
diff --git a/m4/video_out.m4 b/m4/video_out.m4
index 67d063854..c1504df19 100644
--- a/m4/video_out.m4
+++ b/m4/video_out.m4
@@ -74,7 +74,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
[test x"$withval" != x"no" && with_caca="yes"],
[test $default_with_caca = without && with_caca=no])
if test x"$with_caca" != x"no"; then
- PKG_CHECK_MODULES([CACA], [caca cucul], [have_caca="yes"], [have_caca="no"])
+ PKG_CHECK_MODULES([CACA], [caca >= 0.99beta14 cucul >= 0.99beta14], [have_caca="yes"], [have_caca="no"])
if test x"$with_caca" = x"yes" && test x"$have_caca" != x"yes"; then
AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found])
fi
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index 885e0ec18..beb22a6cc 100644
--- a/src/combined/ffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -80,6 +80,7 @@ struct ff_video_decoder_s {
uint64_t pts_tag_mask;
uint64_t pts_tag;
int pts_tag_counter;
+ int pts_tag_stable_counter;
int video_step;
uint8_t decoder_ok:1;
@@ -1200,19 +1201,29 @@ static void ff_check_pts_tagging(ff_video_decoder_t *this, uint64_t pts)
{
if (this->pts_tag_mask == 0)
return; /* pts tagging inactive */
-
- if ((pts & this->pts_tag_mask) != this->pts_tag)
+ if ((pts & this->pts_tag_mask) != this->pts_tag) {
+ this->pts_tag_stable_counter = 0;
return; /* pts still outdated */
+ }
+
+ /* the tag should be stable for 100 frames */
+ this->pts_tag_stable_counter++;
if (this->pts_tag != 0) {
- /* first pass: reset pts_tag */
- this->pts_tag = 0;
+ if (this->pts_tag_stable_counter >= 100) {
+ /* first pass: reset pts_tag */
+ this->pts_tag = 0;
+ this->pts_tag_stable_counter = 0;
+ }
} else if (pts == 0)
return; /* cannot detect second pass */
else {
- /* second pass: reset pts_tag_mask and pts_tag_counter */
- this->pts_tag_mask = 0;
- this->pts_tag_counter = 0;
+ if (this->pts_tag_stable_counter >= 100) {
+ /* second pass: reset pts_tag_mask and pts_tag_counter */
+ this->pts_tag_mask = 0;
+ this->pts_tag_counter = 0;
+ this->pts_tag_stable_counter = 0;
+ }
}
}
@@ -1549,6 +1560,7 @@ static void ff_reset (video_decoder_t *this_gen) {
this->pts_tag_mask = 0;
this->pts_tag = 0;
this->pts_tag_counter = 0;
+ this->pts_tag_stable_counter = 0;
}
static void ff_discontinuity (video_decoder_t *this_gen) {
@@ -1570,9 +1582,11 @@ static void ff_discontinuity (video_decoder_t *this_gen) {
this->pts_tag_counter++;
this->pts_tag_mask = 0;
this->pts_tag = 0;
+ this->pts_tag_stable_counter = 0;
{
/* pts values typically don't use the uppermost bits. therefore we put the tag there */
int counter_mask = 1;
+ int counter = 2 * this->pts_tag_counter + 1; /* always set the uppermost bit in tag_mask */
uint64_t tag_mask = 0x8000000000000000ull;
while (this->pts_tag_counter >= counter_mask)
{
@@ -1580,7 +1594,7 @@ static void ff_discontinuity (video_decoder_t *this_gen) {
* mirror the counter into the uppermost bits. this allows us to enlarge mask as
* necessary and while previous taggings can still be detected to be outdated.
*/
- if (this->pts_tag_counter & counter_mask)
+ if (counter & counter_mask)
this->pts_tag |= tag_mask;
this->pts_tag_mask |= tag_mask;
tag_mask >>= 1;