]> git.sesse.net Git - ffmpeg/commitdiff
vf_idet: fix permissions.
authorNicolas George <nicolas.george@normalesup.org>
Tue, 14 Aug 2012 16:45:30 +0000 (18:45 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Fri, 17 Aug 2012 16:26:41 +0000 (18:26 +0200)
Only write needs to be removed, other can be left.

libavfilter/vf_idet.c

index 02d073d4928b5200d36ccb302feefdc3055b7dd2..938f4a0d524d0ce44d389f94271e3fbb981546f0 100644 (file)
@@ -184,9 +184,9 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
         return 0;
 
     if (!idet->prev)
-        idet->prev = avfilter_ref_buffer(idet->cur, AV_PERM_READ);
+        idet->prev = avfilter_ref_buffer(idet->cur, ~0);
 
-    return ff_start_frame(ctx->outputs[0], avfilter_ref_buffer(idet->cur, AV_PERM_READ));
+    return ff_start_frame(ctx->outputs[0], avfilter_ref_buffer(idet->cur, ~0));
 }
 
 static int end_frame(AVFilterLink *link)
@@ -327,11 +327,12 @@ AVFilter avfilter_vf_idet = {
                                           .start_frame      = start_frame,
                                           .draw_slice       = null_draw_slice,
                                           .end_frame        = end_frame,
-                                          .rej_perms        = AV_PERM_REUSE2, },
+                                          .min_perms        = AV_PERM_PRESERVE },
                                         { .name = NULL}},
 
     .outputs   = (const AVFilterPad[]) {{ .name       = "default",
                                           .type             = AVMEDIA_TYPE_VIDEO,
+                                          .rej_perms        = AV_PERM_WRITE,
                                           .poll_frame       = poll_frame,
                                           .request_frame    = request_frame, },
                                         { .name = NULL}},