changeset 5957:0f2c4fa2c4f2 libavcodec

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.
author reimar
date Fri, 30 Nov 2007 21:51:34 +0000
parents 99aba24ddc6c
children ed05a3d964fa
files wmadec.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/wmadec.c	Fri Nov 30 14:08:00 2007 +0000
+++ b/wmadec.c	Fri Nov 30 21:51:34 2007 +0000
@@ -768,6 +768,9 @@
         s->last_superframe_len = 0;
         return 0;
     }
+    if (buf_size < s->block_align)
+        return 0;
+    buf_size = s->block_align;
 
     samples = data;