[SCM] ffmpeg/master: add post 0.7.1 patches

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Thu Aug 25 20:30:58 UTC 2011


The following commit has been merged in the master branch:
commit 2d4218a090f65ce962bc41880e36a2739a3a5bcc
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Thu Aug 25 22:24:47 2011 +0200

    add post 0.7.1 patches

diff --git a/debian/patches/post-0.7.1/0001-riff-Add-mpgv-MPEG-2-fourcc.patch b/debian/patches/post-0.7.1/0001-riff-Add-mpgv-MPEG-2-fourcc.patch
new file mode 100644
index 0000000..786efc0
--- /dev/null
+++ b/debian/patches/post-0.7.1/0001-riff-Add-mpgv-MPEG-2-fourcc.patch
@@ -0,0 +1,26 @@
+From a05219d801cdf0fd83301e893301e9f6ba0ab6ed Mon Sep 17 00:00:00 2001
+From: Alex Converse <alex.converse at gmail.com>
+Date: Fri, 22 Jul 2011 10:13:22 -0700
+Subject: [PATCH 1/4] riff: Add mpgv MPEG-2 fourcc
+
+Supported by mplayer and seen in the wild.
+(cherry picked from commit 505345ed5d180093a44da8d70ac541898c31c22f)
+---
+ libavformat/riff.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/libavformat/riff.c b/libavformat/riff.c
+index 817349c..0df569e 100644
+--- a/libavformat/riff.c
++++ b/libavformat/riff.c
+@@ -130,6 +130,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
+     { CODEC_ID_MPEG2VIDEO,   MKTAG('s', 'l', 'i', 'f') },
+     { CODEC_ID_MPEG2VIDEO,   MKTAG('E', 'M', '2', 'V') },
+     { CODEC_ID_MPEG2VIDEO,   MKTAG('M', '7', '0', '1') }, /* Matrox MPEG2 intra-only */
++    { CODEC_ID_MPEG2VIDEO,   MKTAG('m', 'p', 'g', 'v') },
+     { CODEC_ID_MJPEG,        MKTAG('M', 'J', 'P', 'G') },
+     { CODEC_ID_MJPEG,        MKTAG('L', 'J', 'P', 'G') },
+     { CODEC_ID_MJPEG,        MKTAG('d', 'm', 'b', '1') },
+-- 
+1.7.4.1
+
diff --git a/debian/patches/post-0.7.1/0002-jpegdec-actually-search-for-and-parse-RSTn.patch b/debian/patches/post-0.7.1/0002-jpegdec-actually-search-for-and-parse-RSTn.patch
new file mode 100644
index 0000000..7c94dcd
--- /dev/null
+++ b/debian/patches/post-0.7.1/0002-jpegdec-actually-search-for-and-parse-RSTn.patch
@@ -0,0 +1,41 @@
+From 00c5cf4beb0e45e936544a5766b56e241ae03234 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni at gmx.at>
+Date: Thu, 9 Jun 2011 03:35:50 +0200
+Subject: [PATCH 2/4] jpegdec: actually search for and parse RSTn
+
+Fixes decoding of MJPEG files produced by some UVC Logitec web cameras,
+such as "Notebook Pro" and "HD C910".
+
+References:
+http://trac.videolan.org/vlc/ticket/4215
+http://ffmpeg.org/trac/ffmpeg/ticket/267
+
+Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
+Reviewed-by: Kostya <kostya.shishkov at gmail.com>
+(cherry picked from commit 8c0fa61a9713a1306fca7997dd04d72ea1f060ea)
+---
+ libavcodec/mjpegdec.c |    7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
+index 391d58d..3f6b1f1 100644
+--- a/libavcodec/mjpegdec.c
++++ b/libavcodec/mjpegdec.c
+@@ -879,9 +879,12 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, i
+                 }
+             }
+ 
+-            if (s->restart_interval && !--s->restart_count) {
++            if (s->restart_interval && show_bits(&s->gb, 8) == 0xFF){ /* skip RSTn */
++                --s->restart_count;
+                 align_get_bits(&s->gb);
+-                skip_bits(&s->gb, 16); /* skip RSTn */
++                while(show_bits(&s->gb, 8) == 0xFF)
++                    skip_bits(&s->gb, 8);
++                skip_bits(&s->gb, 8);
+                 for (i=0; i<nb_components; i++) /* reset dc */
+                     s->last_dc[i] = 1024;
+             }
+-- 
+1.7.4.1
+
diff --git a/debian/patches/post-0.7.1/0003-cavs-fix-some-crashes-with-invalid-bitstreams.patch b/debian/patches/post-0.7.1/0003-cavs-fix-some-crashes-with-invalid-bitstreams.patch
new file mode 100644
index 0000000..136313d
--- /dev/null
+++ b/debian/patches/post-0.7.1/0003-cavs-fix-some-crashes-with-invalid-bitstreams.patch
@@ -0,0 +1,67 @@
+From bd968d260aef322fb32e254a3de0d2036c57bd56 Mon Sep 17 00:00:00 2001
+From: Mans Rullgard <mans at mansr.com>
+Date: Wed, 10 Aug 2011 18:52:11 +0100
+Subject: [PATCH 3/4] cavs: fix some crashes with invalid bitstreams
+
+This removes all valgrind-reported invalid writes with one
+specific test file.
+
+Fixes http://www.ocert.org/advisories/ocert-2011-002.html
+
+Signed-off-by: Mans Rullgard <mans at mansr.com>
+(cherry picked from commit 4a71da0f3ab7f5542decd11c81994f849d5b2c78)
+---
+ libavcodec/cavsdec.c |   11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
+index a9e4d37..35c37d0 100644
+--- a/libavcodec/cavsdec.c
++++ b/libavcodec/cavsdec.c
+@@ -130,12 +130,14 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb,
+                 r++;
+             mask = -(level_code & 1);
+             level = (level^mask) - mask;
+-        } else {
++        } else if (level_code >= 0) {
+             level = r->rltab[level_code][0];
+             if(!level) //end of block signal
+                 break;
+             run   = r->rltab[level_code][1];
+             r += r->rltab[level_code][2];
++        } else {
++            break;
+         }
+         level_buf[i] = level;
+         run_buf[i] = run;
+@@ -189,7 +191,8 @@ static inline int decode_residual_inter(AVSContext *h) {
+ 
+ static int decode_mb_i(AVSContext *h, int cbp_code) {
+     GetBitContext *gb = &h->s.gb;
+-    int block, pred_mode_uv;
++    unsigned pred_mode_uv;
++    int block;
+     uint8_t top[18];
+     uint8_t *left = NULL;
+     uint8_t *d;
+@@ -445,6 +448,8 @@ static inline int check_for_slice(AVSContext *h) {
+     if((show_bits_long(gb,24+align) & 0xFFFFFF) == 0x000001) {
+         skip_bits_long(gb,24+align);
+         h->stc = get_bits(gb,8);
++        if (h->stc >= h->mb_height)
++            return 0;
+         decode_slice_header(h,gb);
+         return 1;
+     }
+@@ -659,7 +664,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
+     buf_end = buf + buf_size;
+     for(;;) {
+         buf_ptr = ff_find_start_code(buf_ptr,buf_end, &stc);
+-        if(stc & 0xFFFFFE00)
++        if((stc & 0xFFFFFE00) || buf_ptr == buf_end)
+             return FFMAX(0, buf_ptr - buf - s->parse_context.last_index);
+         input_size = (buf_end - buf_ptr)*8;
+         switch(stc) {
+-- 
+1.7.4.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 89693a4..74cfcdb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,5 @@
 01-Tweak-doxygen-config.patch
+
+post-0.7.1/0001-riff-Add-mpgv-MPEG-2-fourcc.patch
+post-0.7.1/0002-jpegdec-actually-search-for-and-parse-RSTn.patch
+post-0.7.1/0003-cavs-fix-some-crashes-with-invalid-bitstreams.patch

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list