From: ddennedy Date: Mon, 20 Oct 2008 23:26:39 +0000 (+0000) Subject: producer_avformat.c: bugfix Ogg Vorbis files and possibly others that report invalid... X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=324119a5be8207ae85aa05c238bb70590d7a681e;p=melted producer_avformat.c: bugfix Ogg Vorbis files and possibly others that report invalid pts on some packets git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1188 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index 0b9fdb2..909d424 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -989,9 +989,12 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form } // If we're behind, ignore this packet - float current_pts = av_q2d( stream->time_base ) * pkt.pts; - if ( seekable && ( !ignore && current_pts <= ( real_timecode - 0.02 ) ) ) - ignore = 1; + if ( pkt.pts >= 0 ) + { + float current_pts = av_q2d( stream->time_base ) * pkt.pts; + if ( seekable && ( !ignore && current_pts <= ( real_timecode - 0.02 ) ) ) + ignore = 1; + } } // We're finished with this packet regardless