From: ddennedy Date: Sun, 11 Jan 2004 21:52:06 +0000 (+0000) Subject: small change to prevent segfault in some transitions time specifications X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=f5778b64f410f048403d510c1f950e3ac5132734;p=melted small change to prevent segfault in some transitions time specifications git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@57 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/mlt/src/framework/mlt_frame.c b/mlt/src/framework/mlt_frame.c index ba59ad9..64ec68d 100644 --- a/mlt/src/framework/mlt_frame.c +++ b/mlt/src/framework/mlt_frame.c @@ -397,9 +397,9 @@ int mlt_convert_yuv420p_to_yuv422( uint8_t *yuv420p, int width, int height, int int mlt_frame_composite_yuv( mlt_frame this, mlt_frame that, int x, int y, float weight ) { int ret = 0; - int width_src, height_src; - int width_dest, height_dest; - mlt_image_format format_src, format_dest; + int width_src = 0, height_src = 0; + int width_dest = 0, height_dest = 0; + mlt_image_format format_src = mlt_image_yuv422, format_dest = mlt_image_yuv422; uint8_t *p_src, *p_dest; int i, j; int stride_src; @@ -416,7 +416,7 @@ int mlt_frame_composite_yuv( mlt_frame this, mlt_frame that, int x, int y, float //fprintf( stderr, "call get_image on frame a\n"), fflush( stderr ); mlt_frame_get_image( this, &p_dest, &format_dest, &width_dest, &height_dest, 1 /* writable */ ); //fprintf( stderr, "call get_image on frame b\n"), fflush( stderr ); - mlt_frame_get_image( that, &p_src, &format_src, &width_src, &height_src, 1 /* writable */ ); + mlt_frame_get_image( that, &p_src, &format_src, &width_src, &height_src, 0 /* writable */ ); //fprintf( stderr, "mlt_frame_composite_yuv %dx%d -> %dx%d\n", width_src, height_src, width_dest, height_dest ); //fflush(stderr); diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index ba59ad9..64ec68d 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -397,9 +397,9 @@ int mlt_convert_yuv420p_to_yuv422( uint8_t *yuv420p, int width, int height, int int mlt_frame_composite_yuv( mlt_frame this, mlt_frame that, int x, int y, float weight ) { int ret = 0; - int width_src, height_src; - int width_dest, height_dest; - mlt_image_format format_src, format_dest; + int width_src = 0, height_src = 0; + int width_dest = 0, height_dest = 0; + mlt_image_format format_src = mlt_image_yuv422, format_dest = mlt_image_yuv422; uint8_t *p_src, *p_dest; int i, j; int stride_src; @@ -416,7 +416,7 @@ int mlt_frame_composite_yuv( mlt_frame this, mlt_frame that, int x, int y, float //fprintf( stderr, "call get_image on frame a\n"), fflush( stderr ); mlt_frame_get_image( this, &p_dest, &format_dest, &width_dest, &height_dest, 1 /* writable */ ); //fprintf( stderr, "call get_image on frame b\n"), fflush( stderr ); - mlt_frame_get_image( that, &p_src, &format_src, &width_src, &height_src, 1 /* writable */ ); + mlt_frame_get_image( that, &p_src, &format_src, &width_src, &height_src, 0 /* writable */ ); //fprintf( stderr, "mlt_frame_composite_yuv %dx%d -> %dx%d\n", width_src, height_src, width_dest, height_dest ); //fflush(stderr);