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

Submitted by Peter Große on Jan. 21, 2017, 2:39 p.m.

Details

Message ID 20170121143909.29028-5-pegro@friiks.de
State New
Headers show

Commit Message

Peter Große Jan. 21, 2017, 2:39 p.m.
From: Anton Schubert <ischluff@mailbox.org>

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

Patch hide | download patch | download mbox

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) {