Hi Dan and everyone.
I have been silent for almost a year due to some health issue, but I am fine
now and slowly starting to work again on Kdenlive.
A recent Movit related commit creates a huge memory leak when seeking in
Kdenlive. The responsible commit is this one:
https://github.com/mltframework/mlt/commit/3f84fe14c06956b5092c257fd27da490565566e5
Removing:
*format = mlt_image_none;
in filter_movit_crop.cpp seems to have some bad side effects. I was able to fix
the leak by changing mlt_frame.c and adding some checks for mlt_image_glsl
like:
(...)
- if ( self->convert_image && requested_format !=
mlt_image_none )
+ if ( self->convert_image && requested_format !=
mlt_image_none &&
requested_format != mlt_image_glsl ) {
self->convert_image( self, buffer, format,
requested_format );
(...)
The full patch is attached.
I also have a patch ready for the slowmotion producer (producer_framebuffer.c)
that makes it handle formats mlt_image_none and mlt_image_glsl so that when it
is asked for these formats, it queries the original avformat producer for its
format to set it. I will submit a pull request for it.
Comments welcome,
regards
jb
diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c
index da7bb8e..cf86352 100644
--- a/src/framework/mlt_frame.c
+++ b/src/framework/mlt_frame.c
@@ -582,8 +582,9 @@ int mlt_frame_get_image( mlt_frame self, uint8_t **buffer, mlt_image_format *for
{
mlt_properties_set_int( properties, "width", *width );
mlt_properties_set_int( properties, "height", *height );
- if ( self->convert_image && requested_format != mlt_image_none )
+ if ( self->convert_image && requested_format != mlt_image_none && requested_format != mlt_image_glsl ) {
self->convert_image( self, buffer, format, requested_format );
+ }
mlt_properties_set_int( properties, "format", *format );
}
else
@@ -597,7 +598,7 @@ int mlt_frame_get_image( mlt_frame self, uint8_t **buffer, mlt_image_format *for
*buffer = mlt_properties_get_data( properties, "image", NULL );
*width = mlt_properties_get_int( properties, "width" );
*height = mlt_properties_get_int( properties, "height" );
- if ( self->convert_image && *buffer && requested_format != mlt_image_none )
+ if ( self->convert_image && *buffer && requested_format != mlt_image_none && requested_format != mlt_image_glsl )
{
self->convert_image( self, buffer, format, requested_format );
mlt_properties_set_int( properties, "format", *format );
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel