[FFmpeg-devel] [PATCH 2/4] avformat/smacker: Set audio duration
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Fri Jul 24 11:37:15 EEST 2020
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavformat/smacker.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 5507e7c169..4ab150a6f0 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -315,7 +315,8 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
}
pkt->stream_index = smk->indexes[i];
pkt->pts = smk->aud_pts[i];
- smk->aud_pts[i] += AV_RL32(pkt->data);
+ pkt->duration = AV_RL32(pkt->data);
+ smk->aud_pts[i] += pkt->duration;
smk->next_audio_index = i + 1;
return 0;
}
--
2.20.1
More information about the ffmpeg-devel
mailing list