diff mbox

[FFmpeg-devel,v2,03/11] avformat/dashenc: writing average segment duration for @duration in template mode

Message ID 1522831022-6989-1-git-send-email-vdixit@akamai.com
State Accepted
Commit 51888c85d4c196bffa1a02907d7dcd98d538b889
Headers show

Commit Message

Dixit, Vishwanath April 4, 2018, 8:37 a.m. UTC
From: Vishwanath Dixit <vdixit@akamai.com>

---
 libavformat/dashenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 54ccf30..e719409 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -345,7 +345,7 @@  static void output_segment_list(OutputStream *os, AVIOContext *out, AVFormatCont
         int timescale = c->use_timeline ? os->ctx->streams[0]->time_base.den : AV_TIME_BASE;
         avio_printf(out, "\t\t\t\t<SegmentTemplate timescale=\"%d\" ", timescale);
         if (!c->use_timeline)
-            avio_printf(out, "duration=\"%"PRId64"\" ", c->last_duration);
+            avio_printf(out, "duration=\"%"PRId64"\" ", c->seg_duration);
         avio_printf(out, "initialization=\"%s\" media=\"%s\" startNumber=\"%d\">\n", c->init_seg_name, c->media_seg_name, c->use_timeline ? start_number : 1);
         if (c->use_timeline) {
             int64_t cur_time = 0;