X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ffilter_luma.c;h=ef5043e329dea6eccbd394bc26765b4f8fa60da4;hb=2f768c42c67ec9802222032f6d2bc63d7a3c6afb;hp=b1b27d6f322e9d19d00d6ad5a39e2306e58d5c2e;hpb=0ef075de03b447797a8530585815c8c86aae5178;p=melted diff --git a/src/modules/core/filter_luma.c b/src/modules/core/filter_luma.c index b1b27d6..ef5043e 100644 --- a/src/modules/core/filter_luma.c +++ b/src/modules/core/filter_luma.c @@ -39,7 +39,10 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * mlt_properties properties = mlt_filter_properties( filter ); mlt_transition luma = mlt_properties_get_data( properties, "luma", NULL ); mlt_frame b_frame = mlt_properties_get_data( properties, "frame", NULL ); - int out = 24; + int out = mlt_properties_get_int( properties, "period" ); + + if ( out == 0 ) + out = 24; if ( luma == NULL ) { @@ -51,9 +54,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * mlt_properties_set_int( luma_properties, "in", 0 ); mlt_properties_set_int( luma_properties, "out", out ); mlt_properties_set_int( luma_properties, "reverse", 1 ); - mlt_properties_pass( luma_properties, properties, "luma." ); mlt_properties_set_data( properties, "luma", luma, 0, ( mlt_destructor )mlt_transition_close, NULL ); - out = mlt_properties_get_int( luma_properties, "out" ); } } @@ -66,7 +67,11 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * if ( luma != NULL && ( mlt_properties_get( properties, "blur" ) != NULL || mlt_frame_get_position( this ) % ( out + 1 ) != out ) ) + { + mlt_properties luma_properties = mlt_transition_properties( luma ); + mlt_properties_pass( luma_properties, properties, "luma." ); mlt_transition_process( luma, this, b_frame ); + } error = mlt_frame_get_image( this, image, format, width, height, 1 ); @@ -119,4 +124,3 @@ mlt_filter filter_luma_init( void *arg ) } return this; } -