[MPlayer-dev-eng] WMA MAX_CODED_SUPERFRAME_SIZE too small

Mark Weaver mark at npsl.co.uk
Mon Jun 27 16:37:49 CEST 2005


I have a few WMA file examples where there are superframes >4K.  (These 
files were created with WMP 10, but playback ok with WMP 9/10).  I have 
placed a short sample at http://www.blushingpenguin.com/mark/test.wma 
that exhibits the glitch.  I chopped the file off at 128K but there is 
enough there to show the problem.

On playback these frames are simply dropped causing audio glitches. 
During testing I have seen frames of about 8,900 bytes.  The resolution 
is pretty straightforward -- just increasing the 
MAX_CODED_SUPERFRAME_SIZE fixes it.  I picked 16K, but there's no real 
rationale behind that.

The code is in libavcodec/wmadec.c, patch is simply:

--- wmadec_org.c        2005-06-27 15:34:31.114852300 +0100
+++ wmadec.c    2005-06-27 15:05:31.149199000 +0100
@@ -47,7 +47,7 @@
  #define NB_LSP_COEFS 10

  /* XXX: is it a suitable value ? */
-#define MAX_CODED_SUPERFRAME_SIZE 4096
+#define MAX_CODED_SUPERFRAME_SIZE 16384

  #define MAX_CHANNELS 2

HTH,

Mark




More information about the MPlayer-dev-eng mailing list