diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-17 02:39:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-17 02:55:57 +0200 |
commit | aa69db3abfe8ee285a1f951ce00c3407f80f9bde (patch) | |
tree | c3854a25a6570e59c7688f0c64a7341f062fc5f3 /libavfilter | |
parent | 664f0aac62e060d7a28beb7c04d8ca9e35e5e05f (diff) | |
download | ffmpeg-aa69db3abfe8ee285a1f951ce00c3407f80f9bde.tar.gz |
libavfilter: src_buffer: fix planar audio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/src_buffer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavfilter/src_buffer.c b/libavfilter/src_buffer.c index 33b3ec70cb..5aa0f990f5 100644 --- a/libavfilter/src_buffer.c +++ b/libavfilter/src_buffer.c @@ -279,11 +279,10 @@ static AVFilterBufferRef *copy_buffer_ref(AVFilterContext *ctx, buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, ref->audio->nb_samples); channels = av_get_channel_layout_nb_channels(ref->audio->channel_layout); - data_size = av_samples_get_buffer_size(NULL, channels, - ref->audio->nb_samples, - ref->format, 1); - for (i = 0; i < FF_ARRAY_ELEMS(ref->buf->data) && ref->buf->data[i]; i++) - memcpy(buf->buf->data[i], ref->buf->data[i], data_size); + av_samples_copy(buf->extended_data, ref->buf->extended_data, + 0, 0, ref->audio->nb_samples, + channels, + ref->format); break; default: |