[MPlayer-cvslog] r35424 - in trunk/gui: interface.c win32/interface.c
ib
subversion at mplayerhq.hu
Mon Nov 19 16:27:36 CET 2012
Author: ib
Date: Mon Nov 19 16:27:36 2012
New Revision: 35424
Log:
Fix segmentation fault after end of file playback.
At this point (GUI_END_FILE), mpctx's sh_video has already been freed
and thus guiInfo.sh_video->codec->name mustn't be accessed which may
happen as a result of the following uiEventHandling() call.
Patch by Hans-Dieter Kosch, hdkosch kabelbw de.
(Although the Win32 GUI isn't affected, because there is no use of
guiInfo.sh_video->codec->name, it is patched accordingly for the sake of
consistency. At least, it won't be showing the old codec name then, when
there already is none.)
Modified:
trunk/gui/interface.c
trunk/gui/win32/interface.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Mon Nov 19 10:56:50 2012 (r35423)
+++ trunk/gui/interface.c Mon Nov 19 16:27:36 2012 (r35424)
@@ -761,10 +761,10 @@ int gui(int what, void *data)
case GUI_END_FILE:
- uiEventHandling(ivRedraw, 1);
-
guiInfo.sh_video = NULL;
+ uiEventHandling(ivRedraw, 1);
+
if (!uiGotoTheNext && guiInfo.Playing) {
uiGotoTheNext = 1;
break;
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Mon Nov 19 10:56:50 2012 (r35423)
+++ trunk/gui/win32/interface.c Mon Nov 19 16:27:36 2012 (r35424)
@@ -764,6 +764,8 @@ int gui(int what, void *data)
}
case GUI_END_FILE:
{
+ guiInfo.sh_video = NULL;
+
if(!uiGotoTheNext && guiInfo.Playing)
{
uiGotoTheNext = 1;
More information about the MPlayer-cvslog
mailing list