swr: add reversefill_audiodata()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 15:46:41 +0000 (17:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 19 May 2012 17:23:37 +0000 (19:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/swresample.c

index 619c83e..245a85b 100644 (file)
@@ -384,6 +384,16 @@ static void fill_audiodata(AudioData *out, uint8_t *in_arg [SWR_CH_MAX]){
     }
 }
 
+static void reversefill_audiodata(AudioData *out, uint8_t *in_arg [SWR_CH_MAX]){
+    int i;
+    if(out->planar){
+        for(i=0; i<out->ch_count; i++)
+            in_arg[i]= out->ch[i];
+    }else{
+        in_arg[0]= out->ch[0];
+    }
+}
+
 /**
  *
  * out may be equal in.