mlt_frame_set_audio( frame, new_buffer, *format, size, mlt_pool_release );
memcpy( new_buffer, *buffer, size );
*buffer = new_buffer;
+ cx->audio_position = mlt_frame_get_position( nested_frame );
}
else
{
// otherwise return no samples
*samples = 0;
+ *buffer = NULL;
}
- cx->audio_position = mlt_frame_get_position( nested_frame );
return result;
}
if ( mlt_producer_get_speed( this ) != 0 )
actual_position *= mlt_producer_get_speed( this );
mlt_position need_first = floor( actual_position );
- mlt_producer_seek( cx->producer, need_first * mlt_profile_fps( cx->profile )
- / mlt_producer_get_fps( this ) );
+ mlt_producer_seek( cx->producer,
+ lrint( need_first * mlt_profile_fps( cx->profile ) / mlt_producer_get_fps( this ) ) );
// Get the nested frame
mlt_frame nested_frame = mlt_consumer_rt_frame( cx->consumer );