]> git.sesse.net Git - mlt/commitdiff
producer_avformat.c: bugfix Ogg Vorbis files and possibly others that report invalid...
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 20 Oct 2008 23:26:39 +0000 (23:26 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 20 Oct 2008 23:26:39 +0000 (23:26 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1188 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/producer_avformat.c

index 0b9fdb2e15390133b9d595aefe3c3114a3d4a97b..909d424f6aaaccbcfe2c442ad9044cc9e8299555 100644 (file)
@@ -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