// Clean up
mlt_producer_close( producer );
producer = NULL;
+ producer_avformat_close( self );
}
else if ( self->seekable )
{
if ( ret >= 0 && pkt.stream_index == self->video_index && pkt.size > 0 )
{
// Determine time code of the packet
- if ( pkt.pts == AV_NOPTS_VALUE )
+ if ( use_pts && pkt.pts == AV_NOPTS_VALUE )
{
self->invalid_pts_counter++;
if ( self->invalid_pts_counter > 20 )