On Fri, May 10, 2019 at 7:25 PM Jun Li <junli1...@gmail.com> wrote: > > On Thu, May 9, 2019 at 2:08 AM Jun Li <junli1...@gmail.com> wrote: > >> Fix #5090 >> Fix the timestamp rescale issue, from sidx timebase to >> stream's timebase. >> --- >> libavformat/mov.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavformat/mov.c b/libavformat/mov.c >> index 78f692872b..d058855e6c 100644 >> --- a/libavformat/mov.c >> +++ b/libavformat/mov.c >> @@ -5017,7 +5017,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); >> -- >> 2.17.1 >> > > Ping >
This change is for fix the issue of calculating sidx_pts. Sidx box has "earliest_presentation_time", used as pts of the referent track, sidx also has timescale field. So the operation should convert from sidx's timescale to track's timescale, this patch is for addressing this, as well as fixing #5090. Of course this is based on my understanding, so please correct me if I am wrong. Thanks ! Best Regards, Jun _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".