[FFmpeg-cvslog] swr: realloc_audio: support packed audio buffers

Michael Niedermayer git at videolan.org
Sun Mar 25 22:17:16 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar 25 21:50:00 2012 +0200| [59b038b4a4e7addf3c9089b588d9106b14a5f1bf] | committer: Michael Niedermayer

swr: realloc_audio: support packed audio buffers

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

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

 libswresample/swresample.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index a1dcf2a..9b1647d 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -296,7 +296,6 @@ static int realloc_audio(AudioData *a, int count){
     countb= FFALIGN(count*a->bps, 32);
     old= *a;
 
-    av_assert0(a->planar);
     av_assert0(a->bps);
     av_assert0(a->ch_count);
 
@@ -307,6 +306,7 @@ static int realloc_audio(AudioData *a, int count){
         a->ch[i]= a->data + i*(a->planar ? countb : a->bps);
         if(a->planar) memcpy(a->ch[i], old.ch[i], a->count*a->bps);
     }
+    if(!a->planar) memcpy(a->ch[0], old.ch[0], a->count*a->ch_count*a->bps);
     av_free(old.data);
     a->count= count;
 



More information about the ffmpeg-cvslog mailing list