Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#443 closed defect (invalid)

mencoder -audiofile parameter leads to a "double free" crash

Reported by: mplayer@… Owned by: moritz@…
Priority: normal Component: demuxer
Version: 1.0pre7 Severity: critical
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:


Using the "-audiofile" parameter in mencoder leads to the following crash:

$ mencoder -ovc copy -oac copy -audiofile test.wav -o out.avi test.avi
Video stream: ...
Audio stream: ...
* glibc detected * double free or corruption (!prev): 0x086c0308 *

The backtrace below shows the circular call to free_demuxer():

(gdb) bt
#0 free_demuxer (demuxer=0x85b9bb8) at demuxer.c:271
#1 0x08133a42 in demux_close_demuxers (demuxer=0x85ba630) at
#2 0x0810cd91 in free_demuxer (demuxer=0x85ba630) at demuxer.c:228
#3 0x0806f005 in main (argc=3, argv=0x3) at mencoder.c:1907

(I added in debugging code, so the line numbers may be a bit off)

This is probably a bug in demux_demuxers.c:demux_close_demuxers():

That's a hack to free the audio file stream
It's ok atm but we shouldn't free that here
s = priv->ad->stream;

I tried using mplayer from CVS, but it didn't compile for me. However, the
above code segment still exists in the latest CVS revision.

Change History (2)

comment:1 Changed 14 years ago by mplayer@…

I've debugged some more, and I now have the impression that the problem isn't
about a circular call to free_demuxer() -- however it happens, though, the
following function is being called twice with the same address:

demuxer.c:free_demuxer(demuxer_t *demuxer):


comment:2 Changed 14 years ago by mplayer@…

  • Resolution set to invalid
  • Status changed from new to closed

Looking through the CVS code, it looks like the problem has been fixed, though
like I said, CVS isn't compiling for me. I'll close the bug and hope it's
really fixed.

Note: See TracTickets for help on using tickets.