aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-11-29 12:23:26 +0100
committerClément Bœsch <ubitux@gmail.com>2012-11-29 12:55:56 +0100
commitb99f1303ad9ccf09c69f7300e291fee47187d816 (patch)
tree2fed08555480947b252cb1317045179582114cbe
parentea3bad0e9e3e7253f3770946d61dfecc855244e5 (diff)
downloadffmpeg-b99f1303ad9ccf09c69f7300e291fee47187d816.tar.gz
lavfi/concat: switch to filter_frame.
-rw-r--r--libavfilter/avf_concat.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c
index de4c47c79d..eb132822e2 100644
--- a/libavfilter/avf_concat.c
+++ b/libavfilter/avf_concat.c
@@ -178,16 +178,7 @@ static void push_frame(AVFilterContext *ctx, unsigned in_no,
in->pts = av_rescale(in->pts, in->nb_frames, in->nb_frames - 1);
buf->pts += cat->delta_ts;
- switch (buf->type) {
- case AVMEDIA_TYPE_VIDEO:
- ff_start_frame(outlink, buf);
- ff_draw_slice(outlink, 0, outlink->h, 1);
- ff_end_frame(outlink);
- break;
- case AVMEDIA_TYPE_AUDIO:
- ff_filter_frame(outlink, buf);
- break;
- }
+ ff_filter_frame(outlink, buf);
}
static void process_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
@@ -227,23 +218,6 @@ static AVFilterBufferRef *get_audio_buffer(AVFilterLink *inlink, int perms,
return ff_get_audio_buffer(outlink, perms, nb_samples);
}
-static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
-{
- return 0;
-}
-
-static int draw_slice(AVFilterLink *inlink, int y, int h, int dir)
-{
- return 0;
-}
-
-static int end_frame(AVFilterLink *inlink)
-{
- process_frame(inlink, inlink->cur_buf);
- inlink->cur_buf = NULL;
- return 0;
-}
-
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
{
process_frame(inlink, buf);
@@ -389,16 +363,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
.get_video_buffer = get_video_buffer,
.get_audio_buffer = get_audio_buffer,
+ .filter_frame = filter_frame,
};
snprintf(name, sizeof(name), "in%d:%c%d", seg, "va"[type], str);
pad.name = av_strdup(name);
- if (type == AVMEDIA_TYPE_VIDEO) {
- pad.start_frame = start_frame;
- pad.draw_slice = draw_slice;
- pad.end_frame = end_frame;
- } else {
- pad.filter_frame = filter_frame;
- }
ff_insert_inpad(ctx, ctx->nb_inputs, &pad);
}
}