error = mlt_frame_get_image( this, image, format, width, height, 0 );
- if ( error == 0 && *format != output_format )
+ if ( error == 0 && *format != output_format && *width > 0 && *height > 0 )
{
int in_fmt = convert_mlt_to_av_cs( *format );
int out_fmt = convert_mlt_to_av_cs( output_format );