swr: fill_audio_data() support NULL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-05-19 17:44:40 +02:00
parent 3d2515a8f3
commit 186be49fd5
1 changed files with 3 additions and 1 deletions

View 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{