[FFmpeg-devel] [PATCH 4/8] libavformat/dashenc: increase buffer time hints in the manifest

Peter Große pegro at friiks.de
Sat Jan 21 16:39:05 EET 2017


From: Anton Schubert <ischluff at mailbox.org>

Signed-off-by: Anton Schubert <ischluff at mailbox.org>
---
 libavformat/dashenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 7273997..054d0c0 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -483,7 +483,7 @@ static int write_manifest(AVFormatContext *s, int final)
         if (c->use_template && !c->use_timeline)
             update_period = 500;
         avio_printf(out, "\tminimumUpdatePeriod=\"PT%"PRId64"S\"\n", update_period);
-        avio_printf(out, "\tsuggestedPresentationDelay=\"PT%"PRId64"S\"\n", c->last_duration / AV_TIME_BASE);
+        avio_printf(out, "\tsuggestedPresentationDelay=\"PT%"PRId64"S\"\n", 5 * c->last_duration / AV_TIME_BASE);
         if (!c->availability_start_time[0] && s->nb_streams > 0 && c->streams[0].nb_segments > 0) {
             format_date_now(c->availability_start_time, sizeof(c->availability_start_time));
         }
@@ -499,7 +499,7 @@ static int write_manifest(AVFormatContext *s, int final)
         }
     }
     avio_printf(out, "\tminBufferTime=\"");
-    write_time(out, c->last_duration);
+    write_time(out, c->last_duration * 2);
     avio_printf(out, "\">\n");
     avio_printf(out, "\t<ProgramInformation>\n");
     if (title) {
-- 
2.10.2



More information about the ffmpeg-devel mailing list