[FFmpeg-devel] [PATCHv2 1/4] avcodec/mm: set audio pts proportionally to audio offset

Peter Ross pross at xvid.org
Thu Jun 27 01:08:14 EEST 2024


---
 libavformat/mm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mm.c b/libavformat/mm.c
index 23c025d852..a40b5c44bb 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 :
-- 
2.43.0

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240627/a17607ac/attachment.sig>


More information about the ffmpeg-devel mailing list