[SCM] libav/experimental: wma_decode_superframe always returns s->block_align, so make sure we actually consume exactly that amount. Fixes sound artefacts (mostly blips) that mysteriously disappeared after e.g. remuxing with mencoder.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:09:53 UTC 2013


The following commit has been merged in the experimental branch:
commit 4c1e509c11e7b17f7c518bc7f6d366d110b034da
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Fri Nov 30 21:51:34 2007 +0000

    wma_decode_superframe always returns s->block_align, so make
    sure we actually consume exactly that amount.
    Fixes sound artefacts (mostly blips) that mysteriously disappeared
    after e.g. remuxing with mencoder.
    
    Originally committed as revision 11115 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 1573e5d..740f8b3 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -768,6 +768,9 @@ static int wma_decode_superframe(AVCodecContext *avctx,
         s->last_superframe_len = 0;
         return 0;
     }
+    if (buf_size < s->block_align)
+        return 0;
+    buf_size = s->block_align;
 
     samples = data;
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list