[MPlayer-dev-eng] [PATCH] GUI: segfault in gtk/menu.c
Stanislav Maslovski
stanislav.maslovski at gmail.com
Mon Apr 10 14:27:15 CEST 2006
On Mon, Apr 10, 2006 at 01:53:09PM +0200, Guillaume Poirier wrote:
> Hi,
>
> Stanislav Maslovski wrote:
>
> > Noticed another segfault when playing a DVD disk in gmplayer.
> > To reproduce play a short DVD clip (DVD->Play disc, DVD->Titles) and after
> > it finishes try to invoke the menu by right-clicking on MPlayer's window
> > => segfault.
> >
> > The segfault happens at line 492 of Gui/mplayer/gtk/menu.c. The reason of it
> > is not updating the guiIntfStruct.demuxer pointer on the end of the play.
> > This should be done by sending a notification event from within mplayer.c.
> > (the gui events themselves are handled in Gui/interface.c).
> >
> > The patch is attached.
> >
> > --
> > Stanislav
> >
> >
> > ------------------------------------------------------------------------
> >
> > Index: mplayer.c
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/mplayer.c,v
> > retrieving revision 1.927
> > diff -u -r1.927 mplayer.c
> > --- mplayer.c 6 Apr 2006 12:12:08 -0000 1.927
> > +++ mplayer.c 10 Apr 2006 10:08:41 -0000
> > @@ -4972,6 +4972,7 @@
> > #ifdef HAVE_NEW_GUI
> > if( use_gui && !playtree_iter )
> > {
> > + guiGetEvent( guiSetDemuxer,NULL );
> > #ifdef USE_DVDREAD
> > if ( !guiIntfStruct.DiskChanged )
> > #endif
> >
> >
> > ------------------------------------------------------------------------
>
> Even though I don't like the idea of putting yet some more core to
> mplayer.c, I'm not sure if there's many alternative solutions to fix the
> problem....
>
> Can't the GUI know that the playback of a file has just finised, and
> call guiGetEvent( guiSetDemuxer,NULL ) itself?
Okay, I will see if there is such a possibility. But actually, the current
gui implementation works this way: sending events from within mplayer.c
(look at lines 3291-3300 of mplayer.c).
I was not exactly sure about the correct place in mplayer.c where to put that
guiGetEvent( guiSetDemuxer,NULL )
so I would appreciate any comments.
> That would certainly be a cleaner solution, but as I said, I don't know
> the code well enough to be a fair judge.
Me neither. My experience with mplayer's code is just based on extensive
use of grep and reading some related pieces of the code ;)
--
Stanislav
More information about the MPlayer-dev-eng
mailing list