[SCM] ffmpeg/master-0.6: include post 0.6.2 patches from upstream
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Fri Jul 29 09:39:25 UTC 2011
The following commit has been merged in the master-0.6 branch:
commit 5f8ce738045119e4026d89d6576caa561893d1ec
Author: Reinhard Tartler <siretart at tauware.de>
Date: Fri Jul 29 11:35:07 2011 +0200
include post 0.6.2 patches from upstream
diff --git a/debian/patches/AMV-fix-possibly-exploitable-crash.patch b/debian/patches/AMV-fix-possibly-exploitable-crash.patch
deleted file mode 100644
index 61e0b75..0000000
--- a/debian/patches/AMV-fix-possibly-exploitable-crash.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Michael Niedermayer <michaelni at gmx.at>
-Date: Thu, 21 Apr 2011 20:04:21 +0000 (+0200)
-Subject: AMV: Fix possibly exploitable crash.
-X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=89f903b3d5ec38c9c5d90fba7e626fa0eda61a32;hp=73a51e00a74df079507d6355a4e353494ddb0385
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624339
-
-AMV: Fix possibly exploitable crash.
-Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
-Reported-by: Dominic Chell <Dominic.Chell at ngssecure.com>
-Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
----
-
---- a/libavcodec/sp5xdec.c
-+++ b/libavcodec/sp5xdec.c
-@@ -90,7 +90,6 @@ static int sp5x_decode_frame(AVCodecCont
- recoded[j++] = 0xFF;
- recoded[j++] = 0xD9;
-
-- avctx->flags &= ~CODEC_FLAG_EMU_EDGE;
- av_init_packet(&avpkt_recoded);
- avpkt_recoded.data = recoded;
- avpkt_recoded.size = j;
-@@ -216,6 +215,6 @@ AVCodec amv_decoder = {
- NULL,
- ff_mjpeg_decode_end,
- sp5x_decode_frame,
-- CODEC_CAP_DR1,
-+ 0,
- .long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
- };
diff --git a/debian/patches/post-0.6.2/0001-configure-use-dlltools-instead-of-lib.exe.patch b/debian/patches/post-0.6.2/0001-configure-use-dlltools-instead-of-lib.exe.patch
new file mode 100644
index 0000000..debd692
--- /dev/null
+++ b/debian/patches/post-0.6.2/0001-configure-use-dlltools-instead-of-lib.exe.patch
@@ -0,0 +1,45 @@
+From 7fc5bffb542ed8c8bbb98f70e863be8b00326bd0 Mon Sep 17 00:00:00 2001
+From: Luca Barbato <lu_zero at gentoo.org>
+Date: Thu, 17 Mar 2011 02:54:12 +0100
+Subject: [PATCH 01/14] configure: use dlltools instead of lib.exe
+
+This way building ffmpeg on mingw won't require windows specific tools
+(cherry picked from commit ec10a9ab461b26b96eff7bbbb8623f42d8ee04ad)
+
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+---
+ configure | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/configure b/configure
+index 3f5176e..14f00bc 100755
+--- a/configure
++++ b/configure
+@@ -2216,7 +2216,7 @@ case $target_os in
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
+- SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
++ SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
+ SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
+ install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
+ install -d "$(LIBDIR)"; \
+@@ -2224,6 +2224,7 @@ case $target_os in
+ SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
+ SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
+ objformat="win32"
++ dlltool="${cross_prefix}dlltool"
+ enable dos_paths
+ check_cflags -fno-common
+ if ! enabled x86_64; then
+@@ -3002,6 +3003,7 @@ CPPFLAGS=$CPPFLAGS
+ CFLAGS=$CFLAGS
+ ASFLAGS=$ASFLAGS
+ CC_O=$CC_O
++DLLTOOL=$dlltool
+ LDFLAGS=$LDFLAGS
+ FFSERVERLDFLAGS=$FFSERVERLDFLAGS
+ SHFLAGS=$SHFLAGS
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0002-Set-the-correct-target-for-mingw64-dlltool.patch b/debian/patches/post-0.6.2/0002-Set-the-correct-target-for-mingw64-dlltool.patch
new file mode 100644
index 0000000..fc1d64f
--- /dev/null
+++ b/debian/patches/post-0.6.2/0002-Set-the-correct-target-for-mingw64-dlltool.patch
@@ -0,0 +1,29 @@
+From 79e0cbae33350437c30c65a1e2c2c8b41ef92c62 Mon Sep 17 00:00:00 2001
+From: Luca Barbato <lu_zero at gentoo.org>
+Date: Mon, 21 Mar 2011 20:22:51 +0100
+Subject: [PATCH 02/14] Set the correct target for mingw64 dlltool
+
+That fixes .lib creation for the win64 target.
+(cherry picked from commit 417516f63f8a9ee214ee9fa6fcb483962ea0f096)
+
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+---
+ configure | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure b/configure
+index 14f00bc..a1afb0d 100755
+--- a/configure
++++ b/configure
+@@ -2206,7 +2206,7 @@ case $target_os in
+ LIBTARGET=i386
+ if enabled x86_64; then
+ enable malloc_aligned
+- LIBTARGET=x64
++ LIBTARGET="i386:x86-64"
+ elif enabled arm; then
+ LIBTARGET=arm
+ fi
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0003-configure-Add-the-D-parameter-to-the-dlltool-command.patch b/debian/patches/post-0.6.2/0003-configure-Add-the-D-parameter-to-the-dlltool-command.patch
new file mode 100644
index 0000000..f3e6fa0
--- /dev/null
+++ b/debian/patches/post-0.6.2/0003-configure-Add-the-D-parameter-to-the-dlltool-command.patch
@@ -0,0 +1,32 @@
+From 52f9b632b57a64ff058018c9b886ce6e918bbda9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
+Date: Mon, 21 Mar 2011 22:41:38 +0200
+Subject: [PATCH 03/14] configure: Add the -D parameter to the dlltool command
+
+This is required for the generated .lib file to actually
+be usable by MSVC.
+
+Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
+(cherry picked from commit 77e41e047dc487e318a0a47e02cfa99d25459b8a)
+
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+---
+ configure | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure b/configure
+index a1afb0d..eb66ec4 100755
+--- a/configure
++++ b/configure
+@@ -2216,7 +2216,7 @@ case $target_os in
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
+- SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
++ SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
+ SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
+ install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
+ install -d "$(LIBDIR)"; \
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0004-Add-missing-dependencies-for-the-AAC-HE-backport-for.patch b/debian/patches/post-0.6.2/0004-Add-missing-dependencies-for-the-AAC-HE-backport-for.patch
new file mode 100644
index 0000000..e4b32c6
--- /dev/null
+++ b/debian/patches/post-0.6.2/0004-Add-missing-dependencies-for-the-AAC-HE-backport-for.patch
@@ -0,0 +1,45 @@
+From 2b2856bac2012fe505ffd80f441db28c7fc31787 Mon Sep 17 00:00:00 2001
+From: Reinhard Tartler <siretart at tauware.de>
+Date: Tue, 22 Mar 2011 20:57:36 +0100
+Subject: [PATCH 04/14] Add missing dependencies for the AAC-HE backport for hardcoded tables
+
+Unbreaks compilation with --enable-hardcoded-tables
+---
+ Changelog | 5 +++++
+ libavcodec/Makefile | 4 +++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/Changelog b/Changelog
+index 2e0a99c..bcf6428 100644
+--- a/Changelog
++++ b/Changelog
+@@ -1,6 +1,11 @@
+ Entries are sorted chronologically from oldest to youngest within each release,
+ releases are sorted from youngest to oldest.
+
++version 0.6.3:
++
++- fix compilation with --enable-hardcoded-tables
++
++
+ version 0.6.2:
+
+ - Fix invalid reads in VC-1 decoding (related to CVE-2011-0723)
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index 4547ef6..3dd24e7 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -645,7 +645,9 @@ $(SUBDIR)%_tables.h: $(SUBDIR)%_tablegen$(HOSTEXESUF)
+ $(M)./$< > $@
+
+ ifdef CONFIG_HARDCODED_TABLES
+-$(SUBDIR)aac.o: $(SUBDIR)cbrt_tables.h
++$(SUBDIR)aacdec.o: $(SUBDIR)cbrt_tables.h
++$(SUBDIR)aacps.o: $(SUBDIR)aacps_tables.h
++$(SUBDIR)aactab.o: $(SUBDIR)aac_tables.h
+ $(SUBDIR)dv.o: $(SUBDIR)dv_tables.h
+ $(SUBDIR)mdct.o: $(SUBDIR)mdct_tables.h
+ $(SUBDIR)mpegaudiodec.o: $(SUBDIR)mpegaudio_tables.h
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0005-Support-writing-2d-float-arrays.patch b/debian/patches/post-0.6.2/0005-Support-writing-2d-float-arrays.patch
new file mode 100644
index 0000000..9fc6e45
--- /dev/null
+++ b/debian/patches/post-0.6.2/0005-Support-writing-2d-float-arrays.patch
@@ -0,0 +1,44 @@
+From b4eafa8b04802f45a710e712f2ec2676e0a77024 Mon Sep 17 00:00:00 2001
+From: Michael Kostylev <michael.kostylev at gmail.com>
+Date: Thu, 13 May 2010 10:02:04 +0000
+Subject: [PATCH 05/14] Support writing 2d float arrays.
+
+Patch by Michael Kostylev, michael D kostylev A gmail
+
+Originally committed as revision 23105 to svn://svn.ffmpeg.org/ffmpeg/trunk
+(cherry picked from commit 56b37cd1c7f3b5e5a3ece043c7ffccf70874cfb1)
+
+Unbreaks compilation since the HE-AAC v2 backport
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+---
+ libavcodec/tableprint.c | 1 +
+ libavcodec/tableprint.h | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/tableprint.c b/libavcodec/tableprint.c
+index e39606b..0f422eb 100644
+--- a/libavcodec/tableprint.c
++++ b/libavcodec/tableprint.c
+@@ -33,6 +33,7 @@ WRITE_1D_FUNC(float, float, "%.18e", 3)
+ WRITE_2D_FUNC(int8, int8_t)
+ WRITE_2D_FUNC(uint8, uint8_t)
+ WRITE_2D_FUNC(uint32, uint32_t)
++WRITE_2D_FUNC(float, float)
+
+ void write_fileheader(void) {
+ printf("/* This file was generated by libavcodec/tableprint */\n");
+diff --git a/libavcodec/tableprint.h b/libavcodec/tableprint.h
+index d81af97..76ab802 100644
+--- a/libavcodec/tableprint.h
++++ b/libavcodec/tableprint.h
+@@ -66,6 +66,7 @@ void write_float_array (const float *, int);
+ void write_int8_2d_array (const void *, int, int);
+ void write_uint8_2d_array (const void *, int, int);
+ void write_uint32_2d_array(const void *, int, int);
++void write_float_2d_array (const void *, int, int);
+ /** \} */ // end of printfuncs group
+
+ /** Write a standard file header */
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0006-mjpeg-Detect-overreads-in-mjpeg_decode_scan-and-erro.patch b/debian/patches/post-0.6.2/0006-mjpeg-Detect-overreads-in-mjpeg_decode_scan-and-erro.patch
new file mode 100644
index 0000000..3a28a4d
--- /dev/null
+++ b/debian/patches/post-0.6.2/0006-mjpeg-Detect-overreads-in-mjpeg_decode_scan-and-erro.patch
@@ -0,0 +1,32 @@
+From 19166566418e48d13652a6c20468873108cfe955 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni at gmx.at>
+Date: Thu, 21 Apr 2011 22:03:24 +0200
+Subject: [PATCH 06/14] mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
+
+Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
+Signed-off-by: Ronald S. Bultje <rbultje at google.com>
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+
+(cherry picked from commit 0d9cba562b88899f0769e686d19b7953f589069b)
+---
+ libavcodec/mjpegdec.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
+index 7f57af9..9f2f88b 100644
+--- a/libavcodec/mjpegdec.c
++++ b/libavcodec/mjpegdec.c
+@@ -792,6 +792,10 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, i
+ if (s->restart_interval && !s->restart_count)
+ s->restart_count = s->restart_interval;
+
++ if(get_bits_count(&s->gb)>s->gb.size_in_bits){
++ av_log(s->avctx, AV_LOG_ERROR, "overread %d\n", get_bits_count(&s->gb) - s->gb.size_in_bits);
++ return -1;
++ }
+ for(i=0;i<nb_components;i++) {
+ uint8_t *ptr;
+ int n, h, v, x, y, c, j;
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0007-aac-add-headers-needed-for-log2f.patch b/debian/patches/post-0.6.2/0007-aac-add-headers-needed-for-log2f.patch
new file mode 100644
index 0000000..1646d55
--- /dev/null
+++ b/debian/patches/post-0.6.2/0007-aac-add-headers-needed-for-log2f.patch
@@ -0,0 +1,43 @@
+From 036fefebb9c421961c9abef47fbb112481ad81b3 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni at gmx.at>
+Date: Sat, 23 Apr 2011 10:44:21 +0200
+Subject: [PATCH 07/14] aac: add headers needed for log2f()
+
+Allows compilation of aaccoder.c under cygwin
+
+Signed-off-by: Anton Khirnov <anton at khirnov.net>
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+
+(cherry picked from commit 30fe9719344f01a147628e07a8e79a9ccc7e0835)
+---
+ libavcodec/aaccoder.c | 1 +
+ libavcodec/aacsbr.c | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
+index 0957469..08c4801 100644
+--- a/libavcodec/aaccoder.c
++++ b/libavcodec/aaccoder.c
+@@ -35,6 +35,7 @@
+ #include "aac.h"
+ #include "aacenc.h"
+ #include "aactab.h"
++#include "libavutil/libm.h"
+
+ /** bits needed to code codebook run value for long windows */
+ static const uint8_t run_value_bits_long[64] = {
+diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
+index ca5c52c..cac34bb 100644
+--- a/libavcodec/aacsbr.c
++++ b/libavcodec/aacsbr.c
+@@ -32,6 +32,7 @@
+ #include "aacsbrdata.h"
+ #include "fft.h"
+ #include "aacps.h"
++#include "libavutil/libm.h"
+
+ #include <stdint.h>
+ #include <float.h>
+--
+1.7.4.1
+
diff --git a/debian/patches/av_log_races.patch b/debian/patches/post-0.6.2/0008-Fix-races-in-default-av_log-handler.patch
similarity index 96%
rename from debian/patches/av_log_races.patch
rename to debian/patches/post-0.6.2/0008-Fix-races-in-default-av_log-handler.patch
index 0e88d3a..e66bdd9 100644
--- a/debian/patches/av_log_races.patch
+++ b/debian/patches/post-0.6.2/0008-Fix-races-in-default-av_log-handler.patch
@@ -1,7 +1,7 @@
From 66ebf37c735158e060c5acf8df62391b8b6182ef Mon Sep 17 00:00:00 2001
From: Reinhard Tartler <siretart at sandy.tauware.de>
Date: Sat, 30 Apr 2011 08:11:13 +0200
-Subject: [PATCH] Fix races in default av_log handler
+Subject: [PATCH 08/14] Fix races in default av_log handler
Prevent competing threads from overwriting (shared) buffers.
@@ -44,5 +44,5 @@ index 9a8b66e..9319dcd 100644
static void (*av_log_callback)(void*, int, const char*, va_list) = av_log_default_callback;
--
-1.6.1
+1.7.4.1
diff --git a/debian/patches/lavf-inspect-more-frames-for-fps-when-container-time-base-is-coarse.patch b/debian/patches/post-0.6.2/0009-lavf-inspect-more-frames-for-fps-when-container-time.patch
similarity index 94%
rename from debian/patches/lavf-inspect-more-frames-for-fps-when-container-time-base-is-coarse.patch
rename to debian/patches/post-0.6.2/0009-lavf-inspect-more-frames-for-fps-when-container-time.patch
index d90e925..909a397 100644
--- a/debian/patches/lavf-inspect-more-frames-for-fps-when-container-time-base-is-coarse.patch
+++ b/debian/patches/post-0.6.2/0009-lavf-inspect-more-frames-for-fps-when-container-time.patch
@@ -1,5 +1,7 @@
-From: Anssi Hannula<anssi.hannula at iki.fi>
-Subject: fix misdetected fps in mkv and mp4 files
+From 9848e1be2d288747b7f39743ed81481780a7ca47 Mon Sep 17 00:00:00 2001
+From: Reinhard Tartler <siretart at sandy.tauware.de>
+Date: Sat, 30 Apr 2011 08:18:32 +0200
+Subject: [PATCH 09/14] lavf: inspect more frames for fps when container time base is coarse
As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
@@ -15,10 +17,18 @@ Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Tested with mplayer based on this report
http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063
+Signed-off-by: Reinhard Tartler <siretart at tauware.de>
+(cherry picked from commit 7c152a458d3fb0a2fb1aef1f05bfee90fe70697e)
+---
+ libavformat/utils.c | 10 +-
+ tests/ref/fate/cscd | 414 +++++++++++++++++++++++++-------------------------
+ 2 files changed, 216 insertions(+), 208 deletions(-)
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 6224a35..b73d984 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
-@@ -2205,12 +2205,20 @@ int av_find_stream_info(AVFormatContext
+@@ -2205,12 +2205,20 @@ int av_find_stream_info(AVFormatContext *ic)
/* check if one codec still needs to be handled */
for(i=0;i<ic->nb_streams;i++) {
@@ -40,6 +50,8 @@ http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063
break;
if(st->parser && st->parser->parser->split && !st->codec->extradata)
break;
+diff --git a/tests/ref/fate/cscd b/tests/ref/fate/cscd
+index 75a7725..8b89e80 100644
--- a/tests/ref/fate/cscd
+++ b/tests/ref/fate/cscd
@@ -1,208 +1,208 @@
@@ -458,3 +470,6 @@ http://thread.gmane.org/gmane.comp.video.mplayer.user/66043/focus=66063
+0, 587268, 270000, 0x80921b0c
+0, 590133, 270000, 0xf0e626a8
+0, 592997, 270000, 0xf0e626a8
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0010-AMV-disable-DR1-and-don-t-override-EMU_EDGE.patch b/debian/patches/post-0.6.2/0010-AMV-disable-DR1-and-don-t-override-EMU_EDGE.patch
new file mode 100644
index 0000000..3d0d601
--- /dev/null
+++ b/debian/patches/post-0.6.2/0010-AMV-disable-DR1-and-don-t-override-EMU_EDGE.patch
@@ -0,0 +1,44 @@
+From 8539ea3265010c7b79cf52519da6e068847875f9 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni at gmx.at>
+Date: Thu, 28 Apr 2011 21:10:04 +0200
+Subject: [PATCH 10/14] AMV: disable DR1 and don't override EMU_EDGE
+
+This works around a possibly exploitable crash.
+Appearently, vlc can be exploited with a malicous file. This should get
+reverted as soon as a proper fix is found.
+
+Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
+Reported-by: Dominic Chell <Dominic.Chell at ngssecure.com>
+Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
+(cherry picked from commit 89f903b3d5ec38c9c5d90fba7e626fa0eda61a32)
+(cherry picked from commit 9b919571e506fbb72b81a35ca1e7c1bd6efc4209)
+(cherry picked from commit 7089265756a84bf884a7c2290c6cda38d4dfd60f)
+
+Signed-off-by: Reinhard Tartler <siretart at sandy.tauware.de>
+---
+ libavcodec/sp5xdec.c | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
+index 754926a..0899902 100644
+--- a/libavcodec/sp5xdec.c
++++ b/libavcodec/sp5xdec.c
+@@ -90,7 +90,6 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
+ recoded[j++] = 0xFF;
+ recoded[j++] = 0xD9;
+
+- avctx->flags &= ~CODEC_FLAG_EMU_EDGE;
+ av_init_packet(&avpkt_recoded);
+ avpkt_recoded.data = recoded;
+ avpkt_recoded.size = j;
+@@ -216,6 +215,6 @@ AVCodec amv_decoder = {
+ NULL,
+ ff_mjpeg_decode_end,
+ sp5x_decode_frame,
+- CODEC_CAP_DR1,
++ 0,
+ .long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
+ };
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0011-update-Changelog.patch b/debian/patches/post-0.6.2/0011-update-Changelog.patch
new file mode 100644
index 0000000..2f40c67
--- /dev/null
+++ b/debian/patches/post-0.6.2/0011-update-Changelog.patch
@@ -0,0 +1,29 @@
+From b5c3b18bfc8a7439dde535ade1cb090000ed06ea Mon Sep 17 00:00:00 2001
+From: Reinhard Tartler <siretart at sandy.tauware.de>
+Date: Sat, 30 Apr 2011 08:44:07 +0200
+Subject: [PATCH 11/14] update Changelog
+
+---
+ Changelog | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/Changelog b/Changelog
+index bcf6428..b6e6aa2 100644
+--- a/Changelog
++++ b/Changelog
+@@ -4,6 +4,12 @@ releases are sorted from youngest to oldest.
+ version 0.6.3:
+
+ - fix compilation with --enable-hardcoded-tables
++- mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
++- aac: add headers needed for log2f()
++- Fix races in default av_log handler (possibly exploitable)
++- lavf: inspect more frames for fps when container time base is coarse
++- AMV: disable DR1 and don't override EMU_EDGE
++ (addresses http://seclists.org/bugtraq/2011/Apr/257)
+
+
+ version 0.6.2:
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0012-Release-notes-for-0.6.3.patch b/debian/patches/post-0.6.2/0012-Release-notes-for-0.6.3.patch
new file mode 100644
index 0000000..cc2c027
--- /dev/null
+++ b/debian/patches/post-0.6.2/0012-Release-notes-for-0.6.3.patch
@@ -0,0 +1,33 @@
+From f5d14a92cb6aebd0bac3599847d6302842115e3f Mon Sep 17 00:00:00 2001
+From: Reinhard Tartler <siretart at sandy.tauware.de>
+Date: Sat, 30 Apr 2011 09:00:46 +0200
+Subject: [PATCH 12/14] Release notes for 0.6.3
+
+---
+ RELEASE | 13 +++++++++++++
+ 1 files changed, 13 insertions(+), 0 deletions(-)
+
+diff --git a/RELEASE b/RELEASE
+index ddd02e0..5dbdf03 100644
+--- a/RELEASE
++++ b/RELEASE
+@@ -144,3 +144,16 @@ codecs and container formats:
+
+ - VC1 decoder (Change related to CVE-2011-0723)
+ - APE decoder (cf. http://packetstorm.linuxsecurity.com/1103-exploits/vlc105-dos.txt)
++
++
++* 0.6.3
++
++General notes
++-------------
++
++This is another maintenance-only release that addresses a small number
++of bugs such as security and compilation issues. Distributors and system
++integrators are encouraged to update and share their patches against
++this branch.
++
++For a full list of changes please see the Changelog file.
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0013-backport-libvo-aacenc-wrapper-for-aac-encoding.patch b/debian/patches/post-0.6.2/0013-backport-libvo-aacenc-wrapper-for-aac-encoding.patch
new file mode 100644
index 0000000..2a1dca7
--- /dev/null
+++ b/debian/patches/post-0.6.2/0013-backport-libvo-aacenc-wrapper-for-aac-encoding.patch
@@ -0,0 +1,253 @@
+From 2ad6e144573f5ac2c8d4d0e9a2772a1bb45487cb Mon Sep 17 00:00:00 2001
+From: Reinhard Tartler <siretart at tauware.de>
+Date: Fri, 13 May 2011 12:43:40 +0200
+Subject: [PATCH 13/14] backport libvo-aacenc wrapper for aac encoding
+
+---
+ Changelog | 1 +
+ configure | 6 ++
+ doc/general.texi | 2 +-
+ libavcodec/Makefile | 1 +
+ libavcodec/allcodecs.c | 1 +
+ libavcodec/libvo-aacenc.c | 128 +++++++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 138 insertions(+), 1 deletions(-)
+ create mode 100644 libavcodec/libvo-aacenc.c
+
+diff --git a/Changelog b/Changelog
+index b6e6aa2..765a710 100644
+--- a/Changelog
++++ b/Changelog
+@@ -10,6 +10,7 @@ version 0.6.3:
+ - lavf: inspect more frames for fps when container time base is coarse
+ - AMV: disable DR1 and don't override EMU_EDGE
+ (addresses http://seclists.org/bugtraq/2011/Apr/257)
++- AAC encoding via libvo-aacenc
+
+
+ version 0.6.2:
+diff --git a/configure b/configure
+index eb66ec4..b3e2fe1 100755
+--- a/configure
++++ b/configure
+@@ -181,6 +181,7 @@ External library support:
+ --enable-libschroedinger enable Dirac support via libschroedinger [no]
+ --enable-libspeex enable Speex decoding via libspeex [no]
+ --enable-libtheora enable Theora encoding via libtheora [no]
++ --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
+ --enable-libvorbis enable Vorbis encoding via libvorbis,
+ native implementation exists [no]
+ --enable-libvpx enable VP8 support via libvpx [no]
+@@ -929,6 +930,7 @@ CONFIG_LIST="
+ libschroedinger
+ libspeex
+ libtheora
++ libvo_aacenc
+ libvorbis
+ libvpx
+ libx264
+@@ -1357,6 +1359,7 @@ libschroedinger_decoder_deps="libschroedinger"
+ libschroedinger_encoder_deps="libschroedinger"
+ libspeex_decoder_deps="libspeex"
+ libtheora_encoder_deps="libtheora"
++libvo_aacenc_encoder_deps="libvo_aacenc"
+ libvorbis_encoder_deps="libvorbis"
+ libvpx_decoder_deps="libvpx"
+ libvpx_encoder_deps="libvpx"
+@@ -2347,6 +2350,7 @@ die_license_disabled nonfree libfaac
+
+ die_license_disabled version3 libopencore_amrnb
+ die_license_disabled version3 libopencore_amrwb
++die_license_disabled version3 libvo_aacenc
+
+ enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
+
+@@ -2623,6 +2627,7 @@ enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) &&
+ require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
+ enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
+ enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
++enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc
+ enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
+ enabled libvpx && require2 libvpx "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver" -lvpx &&
+ require2 libvpx "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver" -lvpx
+@@ -2903,6 +2908,7 @@ echo "librtmp enabled ${librtmp-no}"
+ echo "libschroedinger enabled ${libschroedinger-no}"
+ echo "libspeex enabled ${libspeex-no}"
+ echo "libtheora enabled ${libtheora-no}"
++echo "libvo-aacenc support ${libvo_aacenc-no}"
+ echo "libvorbis enabled ${libvorbis-no}"
+ echo "libvpx enabled ${libvpx-no}"
+ echo "libx264 enabled ${libx264-no}"
+diff --git a/doc/general.texi b/doc/general.texi
+index dfa5b07..843d4f6 100644
+--- a/doc/general.texi
++++ b/doc/general.texi
+@@ -511,7 +511,7 @@ following image formats are supported:
+ @item Name @tab Encoding @tab Decoding @tab Comments
+ @item 8SVX audio @tab @tab X
+ @item AAC @tab E @tab X
+- @tab encoding supported through external library libfaac
++ @tab encoding supported through external library libfaac and libvo-aacenc
+ @item AC-3 @tab IX @tab X
+ @item ADPCM 4X Movie @tab @tab X
+ @item ADPCM CDROM XA @tab @tab X
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index 3dd24e7..4afce9a 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -527,6 +527,7 @@ OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
+ OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
+ OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
+ OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbis.o
++OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o
+ OBJS-$(CONFIG_LIBVPX_DECODER) += libvpxdec.o
+ OBJS-$(CONFIG_LIBVPX_ENCODER) += libvpxenc.o
+ OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
+diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
+index aa3001c..245a77b 100644
+--- a/libavcodec/allcodecs.c
++++ b/libavcodec/allcodecs.c
+@@ -343,6 +343,7 @@ void avcodec_register_all(void)
+ REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger);
+ REGISTER_DECODER (LIBSPEEX, libspeex);
+ REGISTER_ENCODER (LIBTHEORA, libtheora);
++ REGISTER_ENCODER (LIBVO_AACENC, libvo_aacenc);
+ REGISTER_ENCODER (LIBVORBIS, libvorbis);
+ REGISTER_ENCDEC (LIBVPX, libvpx);
+ REGISTER_ENCODER (LIBX264, libx264);
+diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
+new file mode 100644
+index 0000000..65c2745
+--- /dev/null
++++ b/libavcodec/libvo-aacenc.c
+@@ -0,0 +1,128 @@
++/*
++ * AAC encoder wrapper
++ * Copyright (c) 2010 Martin Storsjo
++ *
++ * This file is part of Libav.
++ *
++ * Libav is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * Libav is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with Libav; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include <vo-aacenc/voAAC.h>
++#include <vo-aacenc/cmnMemory.h>
++
++#include "avcodec.h"
++#include "mpeg4audio.h"
++
++typedef struct AACContext {
++ VO_AUDIO_CODECAPI codec_api;
++ VO_HANDLE handle;
++ VO_MEM_OPERATOR mem_operator;
++ VO_CODEC_INIT_USERDATA user_data;
++} AACContext;
++
++static av_cold int aac_encode_init(AVCodecContext *avctx)
++{
++ AACContext *s = avctx->priv_data;
++ AACENC_PARAM params = { 0 };
++ int index;
++
++ avctx->coded_frame = avcodec_alloc_frame();
++ avctx->frame_size = 1024;
++
++ voGetAACEncAPI(&s->codec_api);
++
++ s->mem_operator.Alloc = cmnMemAlloc;
++ s->mem_operator.Copy = cmnMemCopy;
++ s->mem_operator.Free = cmnMemFree;
++ s->mem_operator.Set = cmnMemSet;
++ s->mem_operator.Check = cmnMemCheck;
++ s->user_data.memflag = VO_IMF_USERMEMOPERATOR;
++ s->user_data.memData = &s->mem_operator;
++ s->codec_api.Init(&s->handle, VO_AUDIO_CodingAAC, &s->user_data);
++
++ params.sampleRate = avctx->sample_rate;
++ params.bitRate = avctx->bit_rate;
++ params.nChannels = avctx->channels;
++ params.adtsUsed = !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER);
++ if (s->codec_api.SetParam(s->handle, VO_PID_AAC_ENCPARAM, ¶ms)
++ != VO_ERR_NONE) {
++ av_log(avctx, AV_LOG_ERROR, "Unable to set encoding parameters\n");
++ return AVERROR_UNKNOWN;
++ }
++
++ avctx->extradata_size = 2;
++ avctx->extradata = av_mallocz(avctx->extradata_size +
++ FF_INPUT_BUFFER_PADDING_SIZE);
++ if (!avctx->extradata)
++ return AVERROR(ENOMEM);
++
++ for (index = 0; index < 16; index++)
++ if (avctx->sample_rate == ff_mpeg4audio_sample_rates[index])
++ break;
++ if (index == 16) {
++ av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n",
++ avctx->sample_rate);
++ return AVERROR_NOTSUPP;
++ }
++ avctx->extradata[0] = 0x02 << 3 | index >> 1;
++ avctx->extradata[1] = (index & 0x01) << 7 | avctx->channels << 3;
++ return 0;
++}
++
++static int aac_encode_close(AVCodecContext *avctx)
++{
++ AACContext *s = avctx->priv_data;
++
++ s->codec_api.Uninit(s->handle);
++ av_freep(&avctx->coded_frame);
++
++ return 0;
++}
++
++static int aac_encode_frame(AVCodecContext *avctx,
++ unsigned char *frame/*out*/,
++ int buf_size, void *data/*in*/)
++{
++ AACContext *s = avctx->priv_data;
++ VO_CODECBUFFER input = { 0 }, output = { 0 };
++ VO_AUDIO_OUTPUTINFO output_info = { { 0 } };
++
++ input.Buffer = data;
++ input.Length = 2 * avctx->channels * avctx->frame_size;
++ output.Buffer = frame;
++ output.Length = buf_size;
++
++ s->codec_api.SetInputData(s->handle, &input);
++ if (s->codec_api.GetOutputData(s->handle, &output, &output_info)
++ != VO_ERR_NONE) {
++ av_log(avctx, AV_LOG_ERROR, "Unable to encode frame\n");
++ return AVERROR_UNKNOWN;
++ }
++ return output.Length;
++}
++
++AVCodec ff_libvo_aacenc_encoder = {
++ "libvo_aacenc",
++ CODEC_TYPE_AUDIO,
++ CODEC_ID_AAC,
++ sizeof(AACContext),
++ aac_encode_init,
++ aac_encode_frame,
++ aac_encode_close,
++ NULL,
++ .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
++ .long_name = NULL_IF_CONFIG_SMALL("libvo-aacenc AAC"),
++};
++
+--
+1.7.4.1
+
diff --git a/debian/patches/post-0.6.2/0014-Fix-ff_imdct_calc_sse-on-gcc-4.6.patch b/debian/patches/post-0.6.2/0014-Fix-ff_imdct_calc_sse-on-gcc-4.6.patch
new file mode 100644
index 0000000..3499032
--- /dev/null
+++ b/debian/patches/post-0.6.2/0014-Fix-ff_imdct_calc_sse-on-gcc-4.6.patch
@@ -0,0 +1,56 @@
+From 03ef9828b551fa9e91898d0f3c156d7c3fa11c92 Mon Sep 17 00:00:00 2001
+From: Reinhard Tartler <siretart at tauware.de>
+Date: Mon, 25 Jul 2011 09:38:48 +0200
+Subject: [PATCH 14/14] Fix ff_imdct_calc_sse() on gcc-4.6
+
+Gcc 4.6 only preserves the first value when using an array with an "m"
+constraint.
+
+Signed-off-by: Mans Rullgard <mans at mansr.com>
+(cherry picked from commit 770c410fbb8e1b87ce8ad7f3d7eddaa55e2b8295)
+
+References:
+http://bugs.debian.org/635324
+
+Conflicts:
+
+ libavcodec/x86/fft_sse.c
+---
+ libavcodec/x86/fft_sse.c | 7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/libavcodec/x86/fft_sse.c b/libavcodec/x86/fft_sse.c
+index a4cce69..eaca44a 100644
+--- a/libavcodec/x86/fft_sse.c
++++ b/libavcodec/x86/fft_sse.c
+@@ -23,7 +23,7 @@
+ #include "libavcodec/dsputil.h"
+ #include "fft.h"
+
+-DECLARE_ALIGNED(16, static const int, m1m1m1m1)[4] =
++DECLARE_ASM_CONST(16, int, ff_m1m1m1m1)[4] =
+ { 1 << 31, 1 << 31, 1 << 31, 1 << 31 };
+
+ void ff_fft_dispatch_sse(FFTComplex *z, int nbits);
+@@ -183,7 +183,7 @@ void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input)
+ j = -n;
+ k = n-16;
+ __asm__ volatile(
+- "movaps %4, %%xmm7 \n"
++ "movaps "MANGLE(ff_m1m1m1m1)", %%xmm7 \n"
+ "1: \n"
+ "movaps (%2,%1), %%xmm0 \n"
+ "movaps (%3,%0), %%xmm1 \n"
+@@ -196,8 +196,7 @@ void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input)
+ "add $16, %0 \n"
+ "jl 1b \n"
+ :"+r"(j), "+r"(k)
+- :"r"(output+n4), "r"(output+n4*3),
+- "m"(*m1m1m1m1)
++ :"r"(output+n4), "r"(output+n4*3)
+ );
+ }
+
+--
+1.7.4.1
+
diff --git a/debian/patches/series b/debian/patches/series
index bf11a72..c9c7859 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,18 @@
0002-Tweak-doxygen-config.patch
disable-configuration-warning.patch
-AMV-fix-possibly-exploitable-crash.patch
-lavf-inspect-more-frames-for-fps-when-container-time-base-is-coarse.patch
-av_log_races.patch
+
+# produced with git format-patch on the upstream branch
+post-0.6.2/0001-configure-use-dlltools-instead-of-lib.exe.patch
+post-0.6.2/0002-Set-the-correct-target-for-mingw64-dlltool.patch
+post-0.6.2/0003-configure-Add-the-D-parameter-to-the-dlltool-command.patch
+post-0.6.2/0004-Add-missing-dependencies-for-the-AAC-HE-backport-for.patch
+post-0.6.2/0005-Support-writing-2d-float-arrays.patch
+post-0.6.2/0006-mjpeg-Detect-overreads-in-mjpeg_decode_scan-and-erro.patch
+post-0.6.2/0007-aac-add-headers-needed-for-log2f.patch
+post-0.6.2/0008-Fix-races-in-default-av_log-handler.patch
+post-0.6.2/0009-lavf-inspect-more-frames-for-fps-when-container-time.patch
+post-0.6.2/0010-AMV-disable-DR1-and-don-t-override-EMU_EDGE.patch
+post-0.6.2/0011-update-Changelog.patch
+post-0.6.2/0012-Release-notes-for-0.6.3.patch
+post-0.6.2/0013-backport-libvo-aacenc-wrapper-for-aac-encoding.patch
+post-0.6.2/0014-Fix-ff_imdct_calc_sse-on-gcc-4.6.patch
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list