[Ffmpeg-devel] Re: WMA decoder improvement

Patrice Bensoussan patrice.bensoussan
Thu Apr 5 23:10:07 CEST 2007

On 5 Apr 2007, at 22:01, Reimar D?ffinger wrote:

> Hello,
> On Thu, Apr 05, 2007 at 09:48:14PM +0100, Patrice Bensoussan wrote:
> [...]
>> This patch completely breaks the decoding of sample files I have.
>> Moreover it generate a lot of warnings at runtime related to double
>> free() calls.
> Why do you think this is related to this patch? Also, at least a  
> sample
> file or a proper backtrace or valgrind log of the double frees  
> would be
> needed.
> And make you sure you did not forget "make distclean".

well... because I narrowed down the problem to this patch. (version  
SVN-r8626 works fine).
Sample file uploaded in /MPlayer/incoming/broken_wma.

backtrace below:

Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
This GDB was configured as "powerpc-apple-darwin"...Reading symbols  
for shared libraries ... done

(gdb) set args -i ~/tmp/WMA/songs/blacksmith.wma ~/Desktop/toto.mp3
(gdb) break malloc_printf
Breakpoint 1 at 0x9012c754
(gdb) r
Starting program: /Users/patriceb/tmp/WMA/ffmpeg/ppc/ffmpeg_g -i ~/ 
tmp/WMA/songs/blacksmith.wma ~/Desktop/toto.mp3
Reading symbols for shared libraries . done
FFmpeg version SVN-r8627, Copyright (c) 2000-2007 Fabrice Bellard, et  
   configuration: --cc=gcc-3.3 --enable-pthreads --disable-network -- 
disable-vhook --enable-small --enable-libmp3lame --enable-libfaac -- 
disable-decoder=cook --extra-ldflags=-L/Users/patriceb/tmp/WMA/opt/ 
lib --extra-cflags=-I/Users/patriceb/tmp/WMA/opt/include --enable-gpl  
--enable-x264 --enable-liba52 --enable-libfaad
   libavutil version: 49.4.0
   libavcodec version: 51.40.2
   libavformat version: 51.11.0
   built on Apr  5 2007 21:33:38, gcc: 3.3 20030304 (Apple Computer,  
Inc. build 1819)
Input #0, asf, from '/Users/patriceb/tmp/WMA/songs/blacksmith.wma':
   Duration: 00:00:34.2, start: 2.600000, bitrate: 164 kb/s
   Stream #0.0: Audio: wmav2, 44100 Hz, stereo, 160 kb/s
File '/Users/patriceb/Desktop/toto.mp3' already exists. Overwrite ?  
[y/N] y
Output #0, mp3, to '/Users/patriceb/Desktop/toto.mp3':
   Stream #0.0: Audio: mp3, 44100 Hz, stereo, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
Press [q] to stop encoding
size=     266kB time=34.1 bitrate=  64.0kbits/s
video:0kB audio:266kB global headers:0kB muxing overhead 0.000000%

Breakpoint 1, 0x9012c754 in malloc_printf ()
(gdb) bt
#0  0x9012c754 in malloc_printf ()
#1  0x900064dc in free ()
#2  0x001c5674 in av_freep (arg=0x18e0488) at /Users/patriceb/tmp/WMA/ 
#3  0x001b9ea0 in ff_mdct_end (s=0x18e0480) at /Users/patriceb/tmp/ 
#4  0x001bc774 in ff_wma_end (avctx=0x901a7844) at /Users/patriceb/ 
#5  0x00053194 in avcodec_close (avctx=0x2005000) at /Users/patriceb/ 
#6  0x0000678c in av_encode (output_files=0x387838,  
nb_output_files=1, input_files=0x387744, nb_input_files=1,  
stream_maps=0x387888, nb_stream_maps=3670016) at /Users/patriceb/tmp/ 
#7  0x0000a724 in main (argc=0, argv=0xbffffa68) at /Users/patriceb/ 

I hope this helps.

More information about the ffmpeg-devel mailing list