[FFmpeg-cvslog] r24895 - trunk/libavfilter/avfilter.c

stefano subversion
Tue Aug 24 10:37:55 CEST 2010


Author: stefano
Date: Tue Aug 24 10:37:54 2010
New Revision: 24895

Log:
Make avfilter_start_frame() invoke avfilter_get_video_buffer() on the
link rather than avfilter_default_get_video_buffer().

This is required as the buffer requested may be greater than the
buffer allocated locally by avfilter_default_get_video_buffer(), for
example if in filterchain there is a pad filter (like in "fifo,pad").

In that case the pad filter will try to write beyond the data of the
allocated buffer, resulting in a crash.

Modified:
   trunk/libavfilter/avfilter.c

Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c	Tue Aug 24 02:46:32 2010	(r24894)
+++ trunk/libavfilter/avfilter.c	Tue Aug 24 10:37:54 2010	(r24895)
@@ -316,7 +316,7 @@ void avfilter_start_frame(AVFilterLink *
                 picref->perms,
                 link_dpad(link).min_perms, link_dpad(link).rej_perms);
 
-        link->cur_buf = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h);
+        link->cur_buf = avfilter_get_video_buffer(link, dst->min_perms, link->w, link->h);
         link->src_buf = picref;
         avfilter_copy_buffer_ref_props(link->cur_buf, link->src_buf);
     }



More information about the ffmpeg-cvslog mailing list