aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/swresample.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-19 17:44:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-19 19:23:37 +0200
commit186be49fd5f2406b4a4905e1e301945223fc7dfa (patch)
treed45f152762f1a6e230ac1514155506f858406254 /libswresample/swresample.c
parent3d2515a8f3ba35f10a69d077936770955b5394da (diff)
downloadffmpeg-186be49fd5f2406b4a4905e1e301945223fc7dfa.tar.gz
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.c4
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{