summaryrefslogtreecommitdiff
path: root/libavfilter/avcodec.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-12-30 15:15:50 +0100
committerNicolas George <nicolas.george@normalesup.org>2013-01-01 02:01:28 +0100
commit2eb2e1798eeea155399197aeb0d8ed9f17d1eb0b (patch)
tree770173d1ea91efcb9a91e1bdd9b0a2a9dbdd2fe6 /libavfilter/avcodec.c
parentf105fe5c22c5b7f426f65d82bee0de47c14bad65 (diff)
downloadffmpeg-2eb2e1798eeea155399197aeb0d8ed9f17d1eb0b.tar.gz
lavfi: add avfilter_get_audio_buffer_ref_from_arrays_channels.
It is the same as avfilter_get_audio_buffer_ref_from_arrays except it has a "channels" and the channel layout can be 0.
Diffstat (limited to 'libavfilter/avcodec.c')
-rw-r--r--libavfilter/avcodec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index 2533bd8f67..dcd6bb6cd2 100644
--- a/libavfilter/avcodec.c
+++ b/libavfilter/avcodec.c
@@ -93,6 +93,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame
int perms)
{
AVFilterBufferRef *samplesref;
+ int channels = av_frame_get_channels(frame);
int64_t layout = av_frame_get_channel_layout(frame);
if(av_frame_get_channels(frame) > 8) // libavfilter does not suport more than 8 channels FIXME, remove once libavfilter is fixed
@@ -103,9 +104,9 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame
return NULL;
}
- samplesref = avfilter_get_audio_buffer_ref_from_arrays((uint8_t **)frame->data, frame->linesize[0], perms,
- frame->nb_samples, frame->format,
- av_frame_get_channel_layout(frame));
+ samplesref = avfilter_get_audio_buffer_ref_from_arrays_channels(
+ (uint8_t **)frame->data, frame->linesize[0], perms,
+ frame->nb_samples, frame->format, channels, layout);
if (!samplesref)
return NULL;
if (avfilter_copy_frame_props(samplesref, frame) < 0) {