According to draft-pantos-http-live-streaming-07, 6.3.4.,
=== quote ===
The initial minimum reload delay is the duration of the last media
segment in the Playlist. Media segment duration is specified by the
EXTINF tag.
If the client reloads a Playlist file and finds that it has not
changed then it MUST wait for a period of one-half the target
duration before retrying.
=== quote end ===
Did not implement the second part (if playlist has not changed).
Previously, playlist reloading interval was TARGETDURATION seconds,
and lags have happened at playback.
Now reloading interval is last known (listed in playlist) segment's
EXTINF value.
Tested old and new way with Wowza 3.0.2 patch3.
---
libavformat/applehttp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 99febc6..a1fcea1 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -393,7 +393,7 @@ reload:
if (v->finished)
return AVERROR_EOF;
while (av_gettime() - v->last_load_time <
- v->target_duration*1000000) {
+ v->segments[v->n_segments-1]->duration * 1000000) {
if (ff_check_interrupt(c->interrupt_callback))
return AVERROR_EXIT;
usleep(100*1000);
--
1.7.7
--
Andrey Utkin
From 3da9806553cbbc9fd7b74bca24b8e6c7b552fe80 Mon Sep 17 00:00:00 2001
From: Andrey Utkin <[email protected]>
Date: Mon, 26 Dec 2011 21:25:52 +0200
Subject: [PATCH] applehttp: reload interval is duration of last segment
According to draft-pantos-http-live-streaming-07, 6.3.4.,
=== quote ===
The initial minimum reload delay is the duration of the last media
segment in the Playlist. Media segment duration is specified by the
EXTINF tag.
If the client reloads a Playlist file and finds that it has not
changed then it MUST wait for a period of one-half the target
duration before retrying.
=== quote end ===
Did not implement the second part (if playlist has not changed).
Previously, playlist reloading interval was TARGETDURATION seconds,
and lags have happened at playback.
Now reloading interval is last known (listed in playlist) segment's
EXTINF value.
Tested old and new way with Wowza 3.0.2 patch3.
---
libavformat/applehttp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 99febc6..a1fcea1 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -393,7 +393,7 @@ reload:
if (v->finished)
return AVERROR_EOF;
while (av_gettime() - v->last_load_time <
- v->target_duration*1000000) {
+ v->segments[v->n_segments-1]->duration * 1000000) {
if (ff_check_interrupt(c->interrupt_callback))
return AVERROR_EXIT;
usleep(100*1000);
--
1.7.7
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel