[FFmpeg-devel] [PATCH] libavfilter-soc: Fix a buffer reuse bug in the movie filter

Michael Niedermayer michaelni
Fri May 8 13:57:09 CEST 2009


On Fri, May 08, 2009 at 12:29:35PM +0200, Vitor Sessak wrote:
> Martin Storsj? wrote:
>> Hi,
>> There's a slight bug in the movie source filter in libavfilter; it hands 
>> out a buffer pointing to the codec internal frame buffer, which the 
>> receiving filter may store. This can lead to bugs where a stored frame 
>> reference changes content without further warning.
>> This doesn't seem to be visible with most videos, but I encountered it 
>> with the following movie:
>> http://movies.apple.com/movies/sony_pictures/casino_royale/casino_royale-tlr1_h640w.mov
>> To trigger the bug, run the following command:
>> ./ffplay casino_royale-tlr1_h640w.mov -vfilters 
>> "movie=0:mov:casino_royale-tlr1_h640w.mov [over1], [in] [over1] 
>> overlay=100:100 [out]"
>> In this case, frames are displayed a bit too soon/too late.
>> If a scale filter is plugged between the movie and overlay filters, this 
>> effect disappears.
>> The attached patch corrects this bug, by marking the output video buffer 
>> with the correct permission flags (in the same way as in the buffer video 
>> source filter).
>
> Looks correct to me, applied.

just a note

vsrc_movie.c is unfit for ffmpeg svn 
the very minimum standard for inclusion in ffmpeg svn is mplayers
libmpcodecs.
libmpcodecs supports direct rendering, vsrc_movie.c does not, this hack
does not move it closer to being acceptable either.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090508/f3ebd905/attachment.pgp>



More information about the ffmpeg-devel mailing list