[MPlayer-users] patch to fix illegal memory access in mplayer (fwd)
arpi at thot.banki.hu
Sun Oct 6 18:24:01 CEST 2002
> I posted this fix in mplayer-dev-eng but got the message that its
> a subscriber-only list now and my post will go thru a moderator if it has
why don't you subscribe? (to be able to read teh answers, comments on the
> to be posted. Now, I don't know how frequently the moderator(s) filter
> messages since i am yet to see my post appearing. U all can check if the
rarely. the policy is to subscribe and ersend the message, insteda of
waiting years while i go and click your message.
> I was getting segmentation faults with current cvs. The segfaults
> are highly reproducible. I used Electric fence (instead of gdb) to catch
> the exact place where the illegal memory access was occurring. I tracked
> it down to these lines in mplayer.c (cvs v1.587).
> 2640 // time to uninit all, except global stuff:
> 2641 uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC+INITED_INPUT));
> This line frees the structures pointed to by the pointers:
yes, this was a bug. i've fixed it in cvs now, thanks for pointing it out.
the uninit order must be: codecs, demuxer and tehn stream.
it was messed up now, uninit stream, then demuxer and finally codecs :(
> // time to uninit all, except global stuff:
this is bad fix, it will avoid uniniting teh codecs and may cause trouble
or memleak later when playing next file
A'rpi / Astral & ESP-team
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
More information about the MPlayer-users