lavfi/tinterlace: set inlink->cur to NULL, since it is stored internally
authorStefano Sabatini <stefasab@gmail.com>
Tue, 4 Sep 2012 18:36:02 +0000 (20:36 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 5 Sep 2012 22:40:01 +0000 (00:40 +0200)
If not set to NULL, the reference is freed by ff_end_frame(), and later
accessed in end_frame() by the filter code, causing a crash.

libavfilter/vf_tinterlace.c

index 5b03b81..6ec5674 100644 (file)
@@ -206,6 +206,7 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
     avfilter_unref_buffer(tinterlace->cur);
     tinterlace->cur  = tinterlace->next;
     tinterlace->next = picref;
+    inlink->cur_buf = NULL;
     return 0;
 }