Mercurial > mplayer.hg
changeset 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 | 91628537e24e |
children | 4eeb8a38a971 |
files | gui/win32/interface.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/win32/interface.c Wed May 07 13:54:28 2014 +0000 +++ b/gui/win32/interface.c Wed May 07 14:03:40 2014 +0000 @@ -625,8 +625,13 @@ 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)