The 'sidx' earliest_presentation_time field is defined as PTS. Previously, it
was incorrectly assigned to DTS, which could cause sync issues. This commit
fixes the assignment to PTS as noted in the existing FIXME comment, which is
now resolved and removed.
---
libavformat/mov.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f651d0387b..257ea74d5f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5890,11 +5890,9 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb,
MOVAtom atom)
av_log(c->fc, AV_LOG_DEBUG, "found tfdt time %"PRId64
", using it for dts\n", dts);
} else if (has_sidx && !c->use_tfdt || fallback_sidx) {
- // FIXME: sidx earliest_presentation_time is *PTS*, s.b.
- // pts = frag_stream_info->sidx_pts;
- pts = frag_stream_info->sidx_pts; // <--- FIXED
+ pts = frag_stream_info->sidx_pts;
av_log(c->fc, AV_LOG_DEBUG, "found sidx time %"PRId64
- ", using it for pts\n", frag_stream_info->sidx_pts);
// Update log message too if you like, but logically just changing to pts is
the key.
+ ", using it for pts\n", frag_stream_info->sidx_pts);
} else {
dts = sc->track_end - sc->time_offset;
av_log(c->fc, AV_LOG_DEBUG, "found track end time %"PRId64
--
2.49.0.windows.1
--
Disclaimer
This email is governed by the Disclaimer Terms of
somaiya.edu <http://somaiya.edu> which may be viewed at
https://www.somaiya.edu/en/email-disclaimer
<https://www.somaiya.edu/en/email-disclaimer>
Finally, please do not
print this email unless it is necessary. Every unprinted email helps the
environment.
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]