[FFmpeg-devel] [PATCH] Odd, random-appearing crashes

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Jan 12 20:37:34 CET 2012

On Wed, Jan 11, 2012 at 09:10:26PM -0800, Ray Simard wrote:
> The last line uses the value of t.zoom in Transform struct t, but the
> calls to find_motion that pass the pointer to t don't initialize it. The
> result is unpredictable behavior; in my case, things worked right if I
> compiled without optimization, but crashed if I compiled with it, and
> only in Cygwin.  The attached patch clears both Transform
> structs (t and orig) to zero.

I see three ways of fixing it:
1) Initialize zoom to 0 in find_motion, adding a TODO to figure it out
2) Remove all the "zoom"-related stuff since it does nothing at all
3) Implement calculation of the correct zoom value

I guess nothing speaks against also doing what your patch does,
however the fact that it looks like that "zoom" thing has a purpose
while it does not really should be addressed.

More information about the ffmpeg-devel mailing list