- mlt_frame real_frame = NULL;
-
- // Get the producer
- mlt_producer producer = mlt_properties_get_data( properties, "producer", NULL );
-
- // Get the frame position requested
- mlt_position position = mlt_properties_get_position( properties, "frame" );
-
- // Seek the producer to the correct place
- mlt_producer_seek( producer, position );
-
- // Get the real frame
- mlt_service_get_frame( mlt_producer_service( producer ), &real_frame, index );
-
- // Ensure that the real frame gets wiped
- mlt_properties_set_data( mlt_frame_properties( *frame ), "real_frame", real_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
+ mlt_frame real_frame = mlt_properties_get_data( properties, "real_frame", NULL );
+
+ // Obtain real frame if we don't have it
+ if ( real_frame == NULL )
+ {
+ // Get the producer
+ mlt_producer producer = mlt_properties_get_data( properties, "producer", NULL );
+
+ // Get the frame position requested
+ mlt_position position = mlt_properties_get_position( properties, "frame" );
+
+ // Seek the producer to the correct place
+ mlt_producer_seek( producer, position );
+
+ // Get the real frame
+ mlt_service_get_frame( mlt_producer_service( producer ), &real_frame, index );
+
+ // Ensure that the real frame gets wiped eventually
+ mlt_properties_set_data( properties, "real_frame", real_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
+ }
+ else
+ {
+ // Temporary fix - ensure that we aren't seen as a test frame
+ int8_t *image = mlt_properties_get_data( mlt_frame_properties( real_frame ), "image", NULL );
+ mlt_properties_set_data( mlt_frame_properties( *frame ), "image", image, 0, NULL, NULL );
+ mlt_properties_set_int( mlt_frame_properties( *frame ), "test_image", 0 );
+ }