Mercurial > mplayer.hg
comparison gui/win32/interface.c @ 37091:ec312b34e302
Fix segmentation fault.
This would occur when there is no audio.
(This should have been part of r37186 but is missing there.)
author | ib |
---|---|
date | Wed, 07 May 2014 14:03:40 +0000 |
parents | b28b632efeef |
children | 4eeb8a38a971 |
comparison
equal
deleted
inserted
replaced
37090:91628537e24e | 37091:ec312b34e302 |
---|---|
623 break; | 623 break; |
624 } | 624 } |
625 case GUI_SET_AUDIO: | 625 case GUI_SET_AUDIO: |
626 { | 626 { |
627 sh_audio = data; | 627 sh_audio = data; |
628 if (sh_audio) | |
629 { | |
628 ad = sh_audio->ad_driver; | 630 ad = sh_audio->ad_driver; |
629 guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0); | 631 guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0); |
632 } | |
633 else | |
634 guiInfo.AudioPassthrough = FALSE; | |
630 guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0; | 635 guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0; |
631 if (sh_audio && !guiInfo.sh_video) guiInfo.VideoWindow = FALSE; | 636 if (sh_audio && !guiInfo.sh_video) guiInfo.VideoWindow = FALSE; |
632 if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow) | 637 if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow) |
633 ShowWindow(mygui->videowindow, SW_HIDE); | 638 ShowWindow(mygui->videowindow, SW_HIDE); |
634 break; | 639 break; |