[FFmpeg-cvslog] swr: fill_audio_data() support NULL

Michael Niedermayer git at videolan.org
Sat May 19 19:28:55 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 19 17:44:40 2012 +0200| [186be49fd5f2406b4a4905e1e301945223fc7dfa] | committer: Michael Niedermayer

swr: fill_audio_data() support NULL

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=186be49fd5f2406b4a4905e1e301945223fc7dfa
---

 libswresample/swresample.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 24e0ff4..7a75fdb 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{



More information about the ffmpeg-cvslog mailing list