[MPlayer-users] malloc bug with mplayer/ffmpeg on mac os x

G.Roethlin cbreak at gmx.ch
Sun Dec 26 17:29:21 CET 2004


mplayer and mencoder prints messages like the following on exit. This  
only happens on playing .avi and .ogg files with ffmpeg or encoding to  
avi files with lavcodec. It is reproducible on both 1.0pre6-3.3 and the  
latest CVS. The program was compiled with default settings. It is  
compiled and run on Mac OS X.

 > uname -a
Darwin dhcp-32-094.via-eth.ch 7.7.0 Darwin Kernel Version 7.7.0: Sun  
Nov  7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC  Power  
Macintosh powerpc
 > ls -l /usr/lib/libc[.-]*
lrwxr-xr-x  1 root  wheel  15 30 May  2004 /usr/lib/libc.dylib ->  
libSystem.dylib
 > gcc --version
gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
Apple Computer, Inc. version cctools-495.obj~4, GNU assembler version  
1.38

*** malloc[29940]: Deallocation of a pointer not malloced: 0x1804c10;  
This could be a double free(), or free() called with the middle of an  
allocated block; Try setting environment variable MallocHelp to see  
tools to help debug


The full output of mplayer:

MPlayer 1.0pre6-3.3 (C) 2000-2004 MPlayer Team
AltiVec found
CPU: PowerPC

CommandLine: '-vo' 'null' '-ao' 'null' '-v' 'Wir Sind Wir 1.avi' 'Wir  
Sind Wir 2.avi' 'Wir Sind Wir 3.avi'
init_freetype
get_path('font/font.desc') -> '/Users/cbreak/.mplayer/font/font.desc'
font: can't open file: /Users/cbreak/.mplayer/font/font.desc
Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206  
chars)
Using Unoptimized OnScreenDisplay
Using Darwin accurate timing
get_path('input.conf') -> '/Users/cbreak/.mplayer/input.conf'
Parsing input config file /Users/cbreak/.mplayer/input.conf
Input config file /Users/cbreak/.mplayer/input.conf parsed: 26 binds
get_path('Wir Sind Wir 1.avi.conf') -> '/Users/cbreak/.mplayer/Wir Sind  
Wir 1.avi.conf'
Playing Wir Sind Wir 1.avi.
[file] File size is 37090302 bytes
STREAM: [file] Wir Sind Wir 1.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x146
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 5153   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  688 x 560
==========================
list_end=0xD4
==> Found video stream: 0
====== STREAM Header =====
Type: sdiv   FCC: XVID (58564944)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 25/1 = 25.000
Start: 0   Len: 5153
Suggested BufferSize: 34836
Quality 0
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 688
   biHeight 560
   biPlanes 1
   biBitCount 24
   biCompression 1482049860='XVID'
   biSizeImage 1155840
===========================
Regenerating keyframe table for MPEG4 video
list_end=0x146
==> Found audio stream: 1
====== STREAM Header =====
Type: sdua   FCC:  (55)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 44100/1152 = 38.281
Start: 0   Len: 7910
Suggested BufferSize: 1044
Quality 0
Sample size: 0
==========================
found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 15795
Block align: 1152
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=1152
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
===========================
list_end=0x1A4
hdr=Software  size=21
Software  : MEncoder 1.0pre6-3.3
hdr=Name  size=13
Name      : Wir Sind Wir
hdr=Genre  size=6
Genre     : Comic
hdr=Source Form  size=7
Source Form: TV-PAL
list_end=0x232C386
Found movie at 0x100C - 0x232C386
Reading INDEX block, 13063 chunks for 5153 frames (fpos=0x0)
AVI index offset: 0x1008 (movi=0x100C idx0=0x4 idx1=0x27E)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=33499377 (5153) audio size=3263681 (7910)
VIDEO:  [XVID]  688x560  24bpp  25.000 fps  1300.2 kbps (158.7 kbyte/s)
[V] filefmt:3  fourcc:0x58564944  size:688x560  fps:25.00  ftime:=0.0400
Clip info:
  Software: MEncoder 1.0pre6-3.3
  Name: Wir Sind Wir
  Genre: Comic
  Source Form: TV-PAL
get_path('sub/') -> '/Users/cbreak/.mplayer/sub/'
get_path('default.sub') -> '/Users/cbreak/.mplayer/default.sub'
======================================================================== 
==
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 224 kbit Joint-Stereo, BPF: 731
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, 16 bit (0x20), ratio: 28000->176400 (224.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
======================================================================== 
==
======================================================================== 
==
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
======================================================================== 
==
Checking audio filter chain for 44100Hz/2ch/16bit ->  
44100Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000000  
and bps = 2
AF_pre: af format: 2 bps, 2 ch, 44100 hz, big endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Big-Endian)
AO: [null] 44100Hz 2ch Signed 16-bit (Big-Endian) (2 bps)
AO: Description: Null audio output
AO: Author: Tobias Diedrich
Building audio filter chain for 44100Hz/2ch/16bit ->  
44100Hz/2ch/16bit...
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000000  
and bps = 2
[dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000000  
and bps = 2
Starting playback...
XXX initial  v_pts=0.000  a_pos=8709 (0.551)
[ffmpeg] aspect_ratio: 1.228571
VDec: vo config request - 688 x 560 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.23:1 - prescaling to correct movie aspect.
VO Config (688x560->688x560,flags=0,'MPlayer',0x32315659)
VO: [null] 688x560 => 688x560 Planar YV12
VO: Description: Null video output
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
*** [vo] Allocating (slices) mp_image_t, 688x560x12bpp YUV planar,  
577920 bytes
*** [vo] Allocating (slices) mp_image_t, 688x560x12bpp YUV planar,  
577920 bytes
Uninit audio filters... 1.104 ct:  0.048  13/ 13 ??% ??% ??,?% 13 0
[libaf] Removing filter dummy
uninit audio: mp3lib
uninit video: ffmpeg
*** malloc[29940]: Deallocation of a pointer not malloced: 0x1804c10;  
This could be a double free(), or free() called with the middle of an  
allocated block; Try setting environment variable MallocHelp to see  
tools to help debug
*** malloc[29940]: Deallocation of a pointer not malloced: 0x140bb40;  
This could be a double free(), or free() called with the middle of an  
allocated block; Try setting environment variable MallocHelp to see  
tools to help debug
vo: x11 uninit called but X11 not inited..

Exiting... (Quit)

I recompiled mplayer with ./configure --enable-menu --enable-debug=3  
--enable-crash-debug
While running in gdb and with set MallocBadFreeAbort, a back trace shows
#0  0x900429ac in kill ()
#1  0x9009eb1c in abort ()
#2  0x90000fa0 in free ()
#3  0x00058f10 in uninit (sh=0x0) at vd_ffmpeg.c:411
#4  0x000574f4 in uninit_video (sh_video=0x0) at dec_video.c:143
#5  0x00002a3c in uninit_player (mask=3787) at mplayer.c:398
#6  0x00002cc8 in exit_player_with_rc (how=0x2018610 "", rc=31504832)  
at mplayer.c:478
#7  0x00008280 in main (argc=31504832, argv=0x3c2974) at mplayer.c:2769




More information about the MPlayer-users mailing list