[MPlayer-cvslog] r30428 - trunk/libmpcodecs/ad_pcm.c

reimar subversion at mplayerhq.hu
Sun Jan 24 21:46:26 CET 2010


Author: reimar
Date: Sun Jan 24 21:46:26 2010
New Revision: 30428

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

Modified:
   trunk/libmpcodecs/ad_pcm.c

Modified: trunk/libmpcodecs/ad_pcm.c
==============================================================================
--- trunk/libmpcodecs/ad_pcm.c	Sun Jan 24 21:05:28 2010	(r30427)
+++ trunk/libmpcodecs/ad_pcm.c	Sun Jan 24 21:46:26 2010	(r30428)
@@ -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;


More information about the MPlayer-cvslog mailing list