On Tue, Oct 9, 2012 at 8:29 AM, j-b-m <[email protected]> wrote: > Hi, > > The kdenlivetitle producer was not correctly marking its frames as progressive > and aspect ratio was sometimes broken. The patch below fixes the problem. > > regards > jb > > ------------------------------------------------------------ > > diff --git a/src/modules/qimage/producer_kdenlivetitle.c > b/src/modules/qimage/producer_kdenlivetitle.c > index fbee0ec..942a2ee 100644 > --- a/src/modules/qimage/producer_kdenlivetitle.c > +++ b/src/modules/qimage/producer_kdenlivetitle.c > @@ -86,7 +86,7 @@ static int producer_get_image( mlt_frame frame, uint8_t > **buffer, mlt_image_form > // Get width and height (may have changed during the refresh) > *width = mlt_properties_get_int( properties, "width" ); > *height = mlt_properties_get_int( properties, "height" ); > - > + > if ( this->current_image ) > { > // Clone the image and the alpha > @@ -130,9 +130,9 @@ static int producer_get_frame( mlt_producer producer, > mlt_frame_ptr frame, int i > mlt_frame_set_position( *frame, mlt_producer_position( > producer ) ); > > /* Set producer-specific frame properties */ > - mlt_profile profile = mlt_service_profile ( > MLT_PRODUCER_SERVICE( producer ) ) ; > - mlt_properties_set_int( properties, "progressive", ( profile ) > ? profile->progressive : 1 ); > - mlt_properties_set_double( properties, "aspect_ratio", > mlt_properties_get_double( producer_props, "aspect_ratio" ) ); > + mlt_profile profile = mlt_service_profile( > MLT_PRODUCER_SERVICE( producer ) ); > + mlt_properties_set_int( properties, "progressive", > mlt_properties_get_int( producer_props, "progressive" ) ); > + mlt_properties_set_double( properties, "aspect_ratio", > mlt_profile_sar( profile ) );
It does not seem correct that kdenlivetitles' sample aspect ratio is the same as the profile. It seems it should be 1.0 as you made it below, and therefore more appropriate to keep this as-is: set frame's aspect_ratio from the producer's. > /* Push the get_image method */ > mlt_frame_push_get_image( *frame, producer_get_image ); > @@ -169,7 +169,9 @@ mlt_producer producer_kdenlivetitle_init( mlt_profile > profile, mlt_service_type > producer->get_frame = producer_get_frame; > producer->close = ( mlt_destructor )producer_close; > mlt_properties_set( properties, "resource", filename ); > - //mlt_properties_set_int( properties, "aspect_ratio", 1 ); > + // Set the default properties > + mlt_properties_set_int( properties, "progressive", 1 ); > + mlt_properties_set_double( properties, "aspect_ratio", 1.0 ); > read_xml(properties); > return producer; > } > -- +-DRD-+ ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Mlt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mlt-devel
