[FFmpeg-cvslog] lavfi/tinterlace: set inlink->cur to NULL, since it is stored internally

Stefano Sabatini git at videolan.org
Thu Sep 6 00:44:16 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Sep  4 20:36:02 2012 +0200| [fd5293d216316752fd34dcb29051e748f076e5fb] | committer: Stefano Sabatini

lavfi/tinterlace: set inlink->cur to NULL, since it is stored internally

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd5293d216316752fd34dcb29051e748f076e5fb
---

 libavfilter/vf_tinterlace.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 5b03b81..6ec5674 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list