1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-23 03:37:27 +00:00

Fail ad_pcm initialization of WAVEFORMATEX header is missing instead of crashing.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30428 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-01-24 20:46:26 +00:00
parent b8b5fe5570
commit fb8c6688c9

View File

@ -21,6 +21,8 @@ LIBAD_EXTERN(pcm)
static int init(sh_audio_t *sh_audio)
{
WAVEFORMATEX *h=sh_audio->wf;
if (!h)
return 0;
sh_audio->i_bps=h->nAvgBytesPerSec;
sh_audio->channels=h->nChannels;
sh_audio->samplerate=h->nSamplesPerSec;