]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_volumedetect.c
lavfi/drawbox: reindent after previous commit
[ffmpeg] / libavfilter / af_volumedetect.c
index 9bc40f65c783f490ba5414479f14a622c3d7dc39..0ec69604b740585351502e307bac2d6934fd9c38 100644 (file)
@@ -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 }
     },
 };