]> git.sesse.net Git - mlt/commitdiff
Fix audio seeking when no first video pts available.
authorDan Dennedy <dan@dennedy.org>
Mon, 21 Jan 2013 05:24:54 +0000 (21:24 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 21 Jan 2013 05:24:54 +0000 (21:24 -0800)
src/modules/avformat/producer_avformat.c

index 807fb098e14cae0322026893ac8854038a60d399..89643505c02e6ff93ca1eb977e065e88c02555d5 100644 (file)
@@ -2312,7 +2312,7 @@ static int decode_audio( producer_avformat self, int *ignore, AVPacket pkt, int
        if ( pkt.pts >= 0 && ( self->seekable || self->video_format ) && *ignore == 0 && audio_used > samples / 2 )
        {
                int64_t pts = pkt.pts;
-               if ( self->first_pts != 0 )
+               if ( self->first_pts != AV_NOPTS_VALUE )
                        pts -= self->first_pts;
                else if ( context->start_time != AV_NOPTS_VALUE )
                        pts -= context->start_time;