]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_anlmdn: add timeline support
authorPaul B Mahol <onemda@gmail.com>
Sun, 13 Jan 2019 10:55:01 +0000 (11:55 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 13 Jan 2019 10:55:01 +0000 (11:55 +0100)
libavfilter/af_anlmdn.c

index 43ceab8e4a48104844be47c8802d829a64a317ca..c637f170d2f5bea659ecddab8fb4802fcc0fc93c 100644 (file)
@@ -204,7 +204,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
             s->dsp.compute_cache(cache + S, f, S, K, i, i + 1);
         }
 
-        for (int j = 0; j < 2 * S; j++) {
+        for (int j = 0; j < 2 * S && !ctx->is_disabled; j++) {
             const float distance = cache[j];
             unsigned weight_lut_idx;
             float w;
@@ -344,5 +344,6 @@ AVFilter ff_af_anlmdn = {
     .uninit        = uninit,
     .inputs        = inputs,
     .outputs       = outputs,
-    .flags         = AVFILTER_FLAG_SLICE_THREADS,
+    .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
+                     AVFILTER_FLAG_SLICE_THREADS,
 };