From 186be49fd5f2406b4a4905e1e301945223fc7dfa Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 19 May 2012 17:44:40 +0200 Subject: [PATCH] swr: fill_audio_data() support NULL Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 24e0ff4296..7a75fdb1a6 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -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; ich_count; i++) out->ch[i]= in_arg[i]; }else{