# HG changeset patch # User reimar # Date 1264365986 0 # Node ID d33d65802937039d49a2d97ea45e65c2afb4bad6 # Parent b2c5e608155adb7158586913c395b4d9ee828696 Fail ad_pcm initialization of WAVEFORMATEX header is missing instead of crashing. diff -r b2c5e608155a -r d33d65802937 libmpcodecs/ad_pcm.c --- a/libmpcodecs/ad_pcm.c Sun Jan 24 20:05:28 2010 +0000 +++ b/libmpcodecs/ad_pcm.c Sun Jan 24 20:46:26 2010 +0000 @@ -21,6 +21,8 @@ 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;