summaryrefslogtreecommitdiff
path: root/libavfilter/f_sendcmd.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-12-08 11:27:29 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-12-08 12:10:40 +0100
commit35e81441fc24ae9d40205669967b236617f519c9 (patch)
tree2b370b32a6b8f00dec96caab023cff85c721735f /libavfilter/f_sendcmd.c
parent3eae531de2879808e6af7d9920162845e4c54dd3 (diff)
lavfi/sendcmd: switch to filter_frame API
Diffstat (limited to 'libavfilter/f_sendcmd.c')
-rw-r--r--libavfilter/f_sendcmd.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c
index 790c8be3f4..b5cf01c32b 100644
--- a/libavfilter/f_sendcmd.c
+++ b/libavfilter/f_sendcmd.c
@@ -448,7 +448,7 @@ static void av_cold uninit(AVFilterContext *ctx)
av_freep(&sendcmd->intervals);
}
-static int process_frame(AVFilterLink *inlink, AVFilterBufferRef *ref)
+static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *ref)
{
AVFilterContext *ctx = inlink->dst;
SendCmdContext *sendcmd = ctx->priv;
@@ -504,13 +504,12 @@ static int process_frame(AVFilterLink *inlink, AVFilterBufferRef *ref)
}
end:
- /* give the reference away, do not store in cur_buf */
- inlink->cur_buf = NULL;
-
switch (inlink->type) {
- case AVMEDIA_TYPE_VIDEO: return ff_start_frame (inlink->dst->outputs[0], ref);
- case AVMEDIA_TYPE_AUDIO: return ff_filter_frame(inlink->dst->outputs[0], ref);
+ case AVMEDIA_TYPE_VIDEO:
+ case AVMEDIA_TYPE_AUDIO:
+ return ff_filter_frame(inlink->dst->outputs[0], ref);
}
+
return AVERROR(ENOSYS);
}
@@ -529,8 +528,7 @@ static const AVFilterPad sendcmd_inputs[] = {
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
- .start_frame = process_frame,
- .end_frame = ff_null_end_frame,
+ .filter_frame = filter_frame,
},
{ NULL }
};
@@ -572,7 +570,7 @@ static const AVFilterPad asendcmd_inputs[] = {
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer,
- .filter_frame = process_frame,
+ .filter_frame = filter_frame,
},
{ NULL }
};