[MPlayer-cvslog] r37187 - trunk/gui/win32/interface.c

ib subversion at mplayerhq.hu
Wed May 7 16:03:40 CEST 2014


Author: ib
Date: Wed May  7 16:03:40 2014
New Revision: 37187

Log:
Fix segmentation fault.

This would occur when there is no audio.

(This should have been part of r37186 but is missing there.)

Modified:
   trunk/gui/win32/interface.c

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Wed May  7 15:54:28 2014	(r37186)
+++ trunk/gui/win32/interface.c	Wed May  7 16:03:40 2014	(r37187)
@@ -625,8 +625,13 @@ int gui(int what, void *data)
         case GUI_SET_AUDIO:
         {
             sh_audio = data;
+            if (sh_audio)
+            {
             ad = sh_audio->ad_driver;
             guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0);
+            }
+            else
+                guiInfo.AudioPassthrough = FALSE;
             guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0;
             if (sh_audio && !guiInfo.sh_video) guiInfo.VideoWindow = FALSE;
             if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow)


More information about the MPlayer-cvslog mailing list