summaryrefslogtreecommitdiff
path: root/libavfilter/af_channelsplit.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-28 08:41:07 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-08 07:37:18 +0100
commit7e350379f87e7f74420b4813170fe808e2313911 (patch)
tree031201839361d40af8b4c829f9c9f179e7d9f58d /libavfilter/af_channelsplit.c
parent77b2cd7b41d7ec8008b6fac753c04f77824c514c (diff)
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead.
Diffstat (limited to 'libavfilter/af_channelsplit.c')
-rw-r--r--libavfilter/af_channelsplit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index cc379f3126..d6110ef909 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -111,13 +111,13 @@ static int query_formats(AVFilterContext *ctx)
return 0;
}
-static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
+static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
{
AVFilterContext *ctx = inlink->dst;
int i, ret = 0;
for (i = 0; i < ctx->nb_outputs; i++) {
- AVFilterBufferRef *buf_out = avfilter_ref_buffer(buf, ~AV_PERM_WRITE);
+ AVFrame *buf_out = av_frame_clone(buf);
if (!buf_out) {
ret = AVERROR(ENOMEM);
@@ -125,14 +125,14 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
}
buf_out->data[0] = buf_out->extended_data[0] = buf_out->extended_data[i];
- buf_out->audio->channel_layout =
- av_channel_layout_extract_channel(buf->audio->channel_layout, i);
+ buf_out->channel_layout =
+ av_channel_layout_extract_channel(buf->channel_layout, i);
ret = ff_filter_frame(ctx->outputs[i], buf_out);
if (ret < 0)
break;
}
- avfilter_unref_buffer(buf);
+ av_frame_free(&buf);
return ret;
}