codec = avcodec_find_decoder( codec_context->codec_id );
// If we don't have a codec and we can't initialise it, we can't do much more...
+ avformat_lock( );
if ( codec != NULL && avcodec_open( codec_context, codec ) >= 0 )
{
// Now store the codec with its destructor
// Remember that we can't use this later
mlt_properties_set_int( properties, "video_index", -1 );
}
+ avformat_unlock( );
}
// No codec, no show...
codec = avcodec_find_decoder( codec_context->codec_id );
// If we don't have a codec and we can't initialise it, we can't do much more...
+ avformat_lock( );
if ( codec != NULL && avcodec_open( codec_context, codec ) >= 0 )
{
// Now store the codec with its destructor
// Remember that we can't use this later
mlt_properties_set_int( properties, "audio_index", -1 );
}
+ avformat_unlock( );
}
// No codec, no show...