diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 16:37:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 16:37:22 +0200 |
commit | 217f6c53e5c2d27dbe0d41eaea739c7cc6e5640b (patch) | |
tree | 8f2a5b126f1c1a0ade4645e86ae9419b4a977f51 /libavformat | |
parent | fd601ba6b1c6a646aeb19839759644126316371e (diff) | |
parent | 5a70a783f04919514efec7751d710b64d8975fd7 (diff) | |
download | ffmpeg-streaming-217f6c53e5c2d27dbe0d41eaea739c7cc6e5640b.zip ffmpeg-streaming-217f6c53e5c2d27dbe0d41eaea739c7cc6e5640b.tar.gz |
Merge commit '5a70a783f04919514efec7751d710b64d8975fd7'
* commit '5a70a783f04919514efec7751d710b64d8975fd7':
hls: Add an option to prepend a baseurl to the playlist entries
Conflicts:
doc/muxers.texi
libavformat/hlsenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hlsenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 54a56fe..2efa74e 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -55,6 +55,7 @@ typedef struct HLSContext { ListEntry *list; ListEntry *end_list; char *basename; + char *baseurl; AVIOContext *pb; } HLSContext; @@ -149,6 +150,8 @@ static int hls_window(AVFormatContext *s, int last) for (en = hls->list; en; en = en->next) { avio_printf(hls->pb, "#EXTINF:%f,\n", en->duration); + if (hls->baseurl) + avio_printf(hls->pb, "%s", hls->baseurl); avio_printf(hls->pb, "%s\n", en->name); } @@ -325,6 +328,7 @@ static const AVOption options[] = { {"hls_time", "set segment length in seconds", OFFSET(time), AV_OPT_TYPE_FLOAT, {.dbl = 2}, 0, FLT_MAX, E}, {"hls_list_size", "set maximum number of playlist entries", OFFSET(size), AV_OPT_TYPE_INT, {.i64 = 5}, 0, INT_MAX, E}, {"hls_wrap", "set number after which the index wraps", OFFSET(wrap), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E}, + {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, { NULL }, }; |