[MPlayer-dev-eng] [PATCH] GUI: segfault in gtk/menu.c

Guillaume Poirier docmaintainerwannabe at laposte.net
Mon Apr 10 13:53:09 CEST 2006


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?
That would certainly be a cleaner solution, but as I said, I don't know
the code well enough to be a fair judge.

Cheers,

Guillaume




More information about the MPlayer-dev-eng mailing list