diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-19 19:44:40 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-19 21:23:37 +0400 |
commit | 186be49fd5f2406b4a4905e1e301945223fc7dfa (patch) | |
tree | d45f152762f1a6e230ac1514155506f858406254 /libswresample/swresample.c | |
parent | 3d2515a8f3ba35f10a69d077936770955b5394da (diff) |
swr: fill_audio_data() support NULL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; i<out->ch_count; i++) out->ch[i]= in_arg[i]; }else{ |