mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +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:
parent
b8b5fe5570
commit
fb8c6688c9
@ -21,6 +21,8 @@ LIBAD_EXTERN(pcm)
|
|||||||
static int init(sh_audio_t *sh_audio)
|
static int init(sh_audio_t *sh_audio)
|
||||||
{
|
{
|
||||||
WAVEFORMATEX *h=sh_audio->wf;
|
WAVEFORMATEX *h=sh_audio->wf;
|
||||||
|
if (!h)
|
||||||
|
return 0;
|
||||||
sh_audio->i_bps=h->nAvgBytesPerSec;
|
sh_audio->i_bps=h->nAvgBytesPerSec;
|
||||||
sh_audio->channels=h->nChannels;
|
sh_audio->channels=h->nChannels;
|
||||||
sh_audio->samplerate=h->nSamplesPerSec;
|
sh_audio->samplerate=h->nSamplesPerSec;
|
||||||
|
Loading…
Reference in New Issue
Block a user