fixed compiler warnings.
[swftools.git] / lib / modules / swfsound.c
index 5f08150..d08026b 100644 (file)
@@ -47,11 +47,10 @@ void swf_SetSoundStreamBlock(TAG*tag, S16*samples, int numsamples, char first)
     char*buf;
     int len = 0;
 
+    buf = malloc(init->bufferSize);
     if(!buf)
        return;
     
-    buf = malloc(init->bufferSize);
-    
     len = codecEncodeChunk (numsamples, samples, buf);
     len += codecFlush (&buf[len]);
     len += codecExit (&buf[len]);