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-10-17 21:42:20 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-10-25 22:16:09 +0400
commit48ec8b25a7deb1a12cd06a064d2bc16440bcbe92 (patch)
treef7cbe415f723a99549377786122a9801486942de /libavfilter/af_volumedetect.c
parentce028ab9a798f85a7503201be13c3ca01726f81b (diff)
lavfi/af_volumedetect: print stats in uninit().
If the stats are printed when request_frame on the input returns EOF, then they are never printed if the filter is not flushed, in particular when using the -t ffmpeg option. Fix trac ticket #1727.
Diffstat (limited to 'libavfilter/af_volumedetect.c')
-rw-r--r--libavfilter/af_volumedetect.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c
index 9bc40f65c7..0ec69604b7 100644
--- a/libavfilter/af_volumedetect.c
+++ b/libavfilter/af_volumedetect.c
@@ -126,13 +126,9 @@ static void print_stats(AVFilterContext *ctx)
}
}
-static int request_frame(AVFilterLink *outlink)
+static void uninit(AVFilterContext *ctx)
{
- AVFilterContext *ctx = outlink->src;
- int ret = ff_request_frame(ctx->inputs[0]);
- if (ret == AVERROR_EOF)
- print_stats(ctx);
- return ret;
+ print_stats(ctx);
}
AVFilter avfilter_af_volumedetect = {
@@ -141,6 +137,7 @@ AVFilter avfilter_af_volumedetect = {
.priv_size = sizeof(VolDetectContext),
.query_formats = query_formats,
+ .uninit = uninit,
.inputs = (const AVFilterPad[]) {
{ .name = "default",
@@ -152,8 +149,7 @@ AVFilter avfilter_af_volumedetect = {
},
.outputs = (const AVFilterPad[]) {
{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .request_frame = request_frame, },
+ .type = AVMEDIA_TYPE_AUDIO, },
{ .name = NULL }
},
};