Skip to content

Commit

Permalink
Framebuffer producer should obey to the force_aspect_ratio value
Browse files Browse the repository at this point in the history
	modified:   src/modules/kdenlive/producer_framebuffer.c
  • Loading branch information
j-b-m committed Oct 5, 2009
1 parent 8f750ad commit c60de50
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/modules/kdenlive/producer_framebuffer.c
Expand Up @@ -202,12 +202,19 @@ static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index
mlt_frame_push_service( *frame, this );
mlt_frame_push_service( *frame, framebuffer_get_image );

mlt_properties properties = MLT_PRODUCER_PROPERTIES( this );
mlt_properties frame_properties = MLT_FRAME_PROPERTIES(*frame);

double force_aspect_ratio = mlt_properties_get_double( properties, "force_aspect_ratio" );
if ( force_aspect_ratio <= 0.0 ) force_aspect_ratio = mlt_properties_get_double( properties, "aspect_ratio" );
mlt_properties_set_double( frame_properties, "aspect_ratio", force_aspect_ratio );

// Give the returned frame temporal identity
mlt_frame_set_position( *frame, mlt_producer_position( this ) );

mlt_properties_set_int( MLT_FRAME_PROPERTIES(*frame), "real_width", mlt_properties_get_int( MLT_PRODUCER_PROPERTIES(this), "width" ) );
mlt_properties_set_int( MLT_FRAME_PROPERTIES(*frame), "real_height", mlt_properties_get_int( MLT_PRODUCER_PROPERTIES(this), "height" ) );
mlt_properties_pass_list( MLT_FRAME_PROPERTIES(*frame), MLT_PRODUCER_PROPERTIES(this), "width, height, aspect_ratio" );
mlt_properties_set_int( frame_properties, "real_width", mlt_properties_get_int( properties, "width" ) );
mlt_properties_set_int( frame_properties, "real_height", mlt_properties_get_int( properties, "height" ) );
mlt_properties_pass_list( frame_properties, properties, "width, height" );
}

return 0;
Expand Down

0 comments on commit c60de50

Please sign in to comment.