Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-12-27 03:43:12 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-12-30 21:29:57 +0400
commitc36302a7a44b33bbabcc14f22b6d55eec745eec2 (patch)
tree799e1334b8abe4eb0ec2a3846f6b619867754923 /libavfilter
parenta978c04e228e48d5828da5197a4b8eeef9c4ecb8 (diff)
lavfi/sink_buffer: switch to filter_frame.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/sink_buffer.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c
index 88fefba0d9..a34cb24d21 100644
--- a/libavfilter/sink_buffer.c
+++ b/libavfilter/sink_buffer.c
@@ -117,16 +117,14 @@ static int add_buffer_ref(AVFilterContext *ctx, AVFilterBufferRef *ref)
return 0;
}
-static int end_frame(AVFilterLink *inlink)
+static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *ref)
{
AVFilterContext *ctx = inlink->dst;
BufferSinkContext *buf = inlink->dst->priv;
int ret;
- av_assert1(inlink->cur_buf);
- if ((ret = add_buffer_ref(ctx, inlink->cur_buf)) < 0)
+ if ((ret = add_buffer_ref(ctx, ref)) < 0)
return ret;
- inlink->cur_buf = NULL;
if (buf->warning_limit &&
av_fifo_size(buf->fifo) / sizeof(AVFilterBufferRef *) >= buf->warning_limit) {
av_log(ctx, AV_LOG_WARNING,
@@ -238,7 +236,7 @@ static const AVFilterPad ffbuffersink_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
- .end_frame = end_frame,
+ .filter_frame = filter_frame,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
},
{ NULL },
@@ -260,7 +258,7 @@ static const AVFilterPad buffersink_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
- .end_frame = end_frame,
+ .filter_frame = filter_frame,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
},
{ NULL },
@@ -278,12 +276,6 @@ AVFilter avfilter_vsink_buffersink = {
.outputs = NULL,
};
-static int filter_frame(AVFilterLink *link, AVFilterBufferRef *samplesref)
-{
- end_frame(link);
- return 0;
-}
-
static av_cold int asink_init(AVFilterContext *ctx, const char *args, void *opaque)
{
BufferSinkContext *buf = ctx->priv;