]> git.sesse.net Git - ffmpeg/commitdiff
lavf/mov: Fix timestamp rescale on sidx atom
authorJun Li <junli1026@gmail.com>
Thu, 9 May 2019 09:07:56 +0000 (02:07 -0700)
committerJun Zhao <barryjzhao@tencent.com>
Wed, 25 Sep 2019 22:55:44 +0000 (06:55 +0800)
Fix #5090
Fix the timestamp rescale issue, from sidx timebase to
stream's timebase.

libavformat/mov.c

index 1533c35a1dc8485fb502551e99168eee36d74774..8e916a28c60218a84da341a5608bc0bb157c270f 100644 (file)
@@ -5020,7 +5020,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             return AVERROR_PATCHWELCOME;
         }
         avio_rb32(pb); // sap_flags
-        timestamp = av_rescale_q(pts, st->time_base, timescale);
+        timestamp = av_rescale_q(pts, timescale, st->time_base);
 
         index = update_frag_index(c, offset);
         frag_stream_info = get_frag_stream_info(&c->frag_index, index, track_id);