swr: fill_audio_data() support NULL
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 15:44:40 +0000 (17:44 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 17:23:37 +0000 (19:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/swresample.c

index 24e0ff4..7a75fdb 100644 (file)
@@ -372,7 +372,9 @@ static void copy(AudioData *out, AudioData *in,
 
 static void fill_audiodata(AudioData *out, uint8_t *in_arg [SWR_CH_MAX]){
     int i;
-    if(out->planar){
+    if(!in_arg){
+        memset(out->ch, 0, sizeof(out->ch));
+    }else if(out->planar){
         for(i=0; i<out->ch_count; i++)
             out->ch[i]= in_arg[i];
     }else{