diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-30 21:14:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-30 21:14:56 +0200 |
commit | 5b4c8aac97863b4830717db6cb2cd4e3093f9a88 (patch) | |
tree | 84d71b43257dac63fb4bf30b9e9b1d8fd2784c23 /libavformat | |
parent | 8522dd380b2a0f98cfaafcf0ae64bd46ac031ae1 (diff) | |
parent | a16431034d9bd44182bf844d6bbde2c98bc4e6b5 (diff) | |
download | ffmpeg-streaming-5b4c8aac97863b4830717db6cb2cd4e3093f9a88.zip ffmpeg-streaming-5b4c8aac97863b4830717db6cb2cd4e3093f9a88.tar.gz |
Merge commit 'a16431034d9bd44182bf844d6bbde2c98bc4e6b5'
* commit 'a16431034d9bd44182bf844d6bbde2c98bc4e6b5':
hls: Factor the sequence computation
Conflicts:
libavformat/hlsenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hlsenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 2f20441..0b9d8e5 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -133,6 +133,7 @@ static int hls_window(AVFormatContext *s, int last) ListEntry *en; int target_duration = 0; int ret = 0; + int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - hls->nb_entries); if ((ret = avio_open2(&hls->pb, s->filename, AVIO_FLAG_WRITE, &s->interrupt_callback, NULL)) < 0) @@ -146,11 +147,10 @@ static int hls_window(AVFormatContext *s, int last) avio_printf(hls->pb, "#EXTM3U\n"); avio_printf(hls->pb, "#EXT-X-VERSION:3\n"); avio_printf(hls->pb, "#EXT-X-TARGETDURATION:%d\n", target_duration); - avio_printf(hls->pb, "#EXT-X-MEDIA-SEQUENCE:%"PRId64"\n", - FFMAX(hls->start_sequence, hls->sequence - hls->nb_entries)); + avio_printf(hls->pb, "#EXT-X-MEDIA-SEQUENCE:%"PRId64"\n", sequence); av_log(s, AV_LOG_VERBOSE, "EXT-X-MEDIA-SEQUENCE:%"PRId64"\n", - FFMAX(hls->start_sequence, hls->sequence - hls->size)); + sequence); for (en = hls->list; en; en = en->next) { avio_printf(hls->pb, "#EXTINF:%f,\n", en->duration); |