This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 62731e05ab avformat/mov: don't assume a sample to be the last in
fragmented input
62731e05ab is described below
commit 62731e05ab6f8b1aaefc33f3400952e88ada04fe
Author: James Almer <[email protected]>
AuthorDate: Thu Jun 18 13:46:52 2026 -0300
Commit: James Almer <[email protected]>
CommitDate: Thu Jun 18 13:46:54 2026 -0300
avformat/mov: don't assume a sample to be the last in fragmented input
Both the seek index and the stream duration are constantly being updated as
trun boxes are read.
Fixes mpv issue 18149.
Signed-off-by: James Almer <[email protected]>
---
libavformat/mov.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 7513b3ccc1..0915b35a7f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -11626,6 +11626,7 @@ static int get_eia608_packet(AVIOContext *pb, AVPacket
*pkt, int src_size)
static int mov_finalize_packet(AVFormatContext *s, AVStream *st, AVIndexEntry
*sample,
int64_t current_index, AVPacket *pkt)
{
+ MOVContext *mov = s->priv_data;
MOVStreamContext *sc = st->priv_data;
pkt->stream_index = sc->ffindex;
@@ -11647,7 +11648,7 @@ static int mov_finalize_packet(AVFormatContext *s,
AVStream *st, AVIndexEntry *s
pkt->pts = pkt->dts;
}
- if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
+ if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
!mov->fragment.found_tfhd &&
sc->current_sample >= ffstream(st)->nb_index_entries) {
int64_t pts = av_rescale_q(pkt->pts, st->time_base,
(AVRational){ 1, st->codecpar->sample_rate });
int64_t total = av_rescale_q(st->duration, st->time_base,
(AVRational){ 1, st->codecpar->sample_rate });
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]