From ac2442f0a7a97d41089fffe51cc831913799c89b Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Sat, 8 Jun 2024 18:45:13 +1000 Subject: [PATCH] avcodec/mm: set audio pts proportionally to audio offset --- libavformat/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mm.c b/libavformat/mm.c index e377ed4fbb..a99feae6e9 100644 --- a/libavformat/mm.c +++ b/libavformat/mm.c @@ -180,7 +180,8 @@ static int read_packet(AVFormatContext *s, if ((ret = av_get_packet(s->pb, pkt, length)) < 0) return ret; pkt->stream_index = 1; - pkt->pts = mm->audio_pts++; + pkt->pts = mm->audio_pts; + mm->audio_pts += length; return 0; default :