[FFmpeg-cvslog] avcodec/mm: set audio pts proportionally to audio offset

Peter Ross git at videolan.org
Thu Nov 21 11:13:06 EET 2024


ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Sat Jun  8 18:45:13 2024 +1000| [ac2442f0a7a97d41089fffe51cc831913799c89b] | committer: Peter Ross

avcodec/mm: set audio pts proportionally to audio offset

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac2442f0a7a97d41089fffe51cc831913799c89b
---

 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 :



More information about the ffmpeg-cvslog mailing list