static int avformat_initialised = 0;
static pthread_mutex_t avformat_mutex;
+#if 0
void *av_malloc( unsigned int size )
{
return mlt_pool_alloc( size );
{
return mlt_pool_release( ptr );
}
+#endif
/** Constructor for libavformat.
*/
{
mrl[0] = 0;
char *name = strdup( ++mrl );
- char *value = strchr( name, '=' );
+ char *value = strchr( name, ':' );
if ( value )
{
value[0] = 0;
// Store selected audio and video indexes on properties
mlt_properties_set_int( properties, "audio_index", audio_index );
mlt_properties_set_int( properties, "video_index", video_index );
-
+
// We're going to cheat here - for a/v files, we will have two contexts (reasoning will be clear later)
if ( audio_index != -1 && video_index != -1 )
{
mlt_position expected = mlt_properties_get_position( properties, "video_expected" );
// Calculate the real time code
- double real_timecode = producer_time_of_frame( this, position ) + mlt_properties_get_double( properties, "_v_pts_offset" );
+ double real_timecode = producer_time_of_frame( this, position );
// Get the video stream
AVStream *stream = context->streams[ index ];
{
if ( pkt.pts != AV_NOPTS_VALUE && pkt.pts != 0 )
{
- if ( current_time == 0 )
- {
- mlt_properties_set_double( properties, "_v_pts_offset", ( double )( pkt.pts / 1000000 ) );
- real_timecode += pkt.pts / 1000000;
- }
current_time = ( double )pkt.pts / 1000000.0;
}
else