diff mbox series

[FFmpeg-devel,2/4] avformat/smacker: Set audio duration

Message ID 20200724083717.8491-1-andreas.rheinhardt@gmail.com
State Accepted
Commit 40494460f51541530d8ce02ffee88b75d503e33d
Headers show
Series [FFmpeg-devel] avformat/smacker: Support seeking to first frame
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt July 24, 2020, 8:37 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/smacker.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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;
         }