Dan,

While working with the data_show filter, I found that it doesn't work properly 
in the latest git. But it does work properly in 0.7.2. I narrowed the problem 
down to commit d795.

To test the problem, run this command:
melt file.mp4 meta.attr.titles=1 meta.attr.titles.markup=#timecode# -attach 
data_show dynamic=1
It's the example for timecode overlay on the FAQ.

If you run that command with 0.7.2, the timecode is displayed. If you run that 
command with the latest git, the video is choppy (at least on my computer) and 
the overlay is not displayed.

I have attached a patch for your consideration. It adds back the single line 
that makes it work - passing along the consumer_aspect_ratio property from 
props_a to props_b. I don't claim this is the proper fix. I suspect that 
something is broken in mlt_transition.c where you added the code to pass 
properties from a_props to b_props:


    mlt_properties_pass_list( b_props, a_props, "consumer_deinterlace, 
deinterlace_method, consumer_aspect_ratio" );

maybe mlt_properties_pass_list isn't working properly?

Anyway, rather than chase it any further, I thought you might realize the 
problem right away.

Also, in the attached patch, I draw your attention to            

     mlt_properties_set_int( a_props, "consumer_deinterlace", 1 );
The function was called twice with the same parameters. I suspect that you 
meant to call the second one with "b_props".

If the solution isn't obvious to you, or you don't have time to chase it, let 
me know and I can dig deeper.

Let me know if there is anything I can do to help. Thanks,


~Brian
diff --git a/src/modules/core/transition_composite.c 
b/src/modules/core/transition_composite.c
index 7b2622b..f463c15 100644
--- a/src/modules/core/transition_composite.c
+++ b/src/modules/core/transition_composite.c
@@ -1134,23 +1134,27 @@ static int transition_get_image( mlt_frame a_frame, 
uint8_t **image, mlt_image_f
                // NB: Locks needed here since the properties are being modified
                int invert = mlt_properties_get_int( properties, "invert" );
                mlt_service_lock( MLT_TRANSITION_SERVICE( this ) );
                composite_calculate( this, &result, invert ? b_frame : a_frame, 
position );
                mlt_service_unlock( MLT_TRANSITION_SERVICE( this ) );
 
                // Manual option to deinterlace
                if ( mlt_properties_get_int( properties, "deinterlace" ) )
                {
                        mlt_properties_set_int( a_props, 
"consumer_deinterlace", 1 );
-                       mlt_properties_set_int( a_props, 
"consumer_deinterlace", 1 );
+                       mlt_properties_set_int( b_props, 
"consumer_deinterlace", 1 );
                }
 
+               // Since we are the consumer of the b_frame, we must pass along 
these
+               // consumer properties from the a_frame
+               mlt_properties_set_double( b_props, "consumer_aspect_ratio", 
mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) );
+
                // TODO: Dangerous/temporary optimisation - if nothing to do, 
then do nothing
                if ( mlt_properties_get_int( properties, "no_alpha" ) && 
                         result.item.x == 0 && result.item.y == 0 && 
result.item.w == *width && result.item.h == *height && result.item.mix == 100 )
                {
                        mlt_frame_get_image( b_frame, image, format, width, 
height, 1 );
                        if ( !mlt_frame_is_test_card( a_frame ) )
                                mlt_frame_replace_image( a_frame, *image, 
*format, *width, *height );
                        return 0;
                }
 
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to