aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMrBoogs <blendz@shaw.ca>2015-04-21 15:53:57 -0600
committerMichael Niedermayer <michaelni@gmx.at>2015-05-17 17:15:03 +0200
commit4f2fcac290afeda7ac845b546f06d72f73918623 (patch)
tree209a7ce7dc0a008285c611d11953e2c8cb35b02a
parent572a8292cbded93c64110b872d2a8abadc92b741 (diff)
downloadffmpeg-4f2fcac290afeda7ac845b546f06d72f73918623.tar.gz
avformat/hlsenc: do not append an endlist tag when the stream ends
Reviewed-by: Thomas Volkert <silvo@gmx.net>
-rw-r--r--libavformat/hlsenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index f23a89174b..4d9466c91f 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -52,6 +52,7 @@ typedef enum HLSFlags {
HLS_DELETE_SEGMENTS = (1 << 1),
HLS_ROUND_DURATIONS = (1 << 2),
HLS_DISCONT_START = (1 << 3),
+ HLS_OMIT_ENDLIST = (1 << 4),
} HLSFlags;
typedef struct HLSContext {
@@ -293,7 +294,7 @@ static int hls_window(AVFormatContext *s, int last)
avio_printf(out, "%s\n", en->filename);
}
- if (last)
+ if (last && (hls->flags & HLS_OMIT_ENDLIST)==0)
avio_printf(out, "#EXT-X-ENDLIST\n");
fail:
@@ -524,6 +525,7 @@ static const AVOption options[] = {
{"delete_segments", "delete segment files that are no longer part of the playlist", 0, AV_OPT_TYPE_CONST, {.i64 = HLS_DELETE_SEGMENTS }, 0, UINT_MAX, E, "flags"},
{"round_durations", "round durations in m3u8 to whole numbers", 0, AV_OPT_TYPE_CONST, {.i64 = HLS_ROUND_DURATIONS }, 0, UINT_MAX, E, "flags"},
{"discont_start", "start the playlist with a discontinuity tag", 0, AV_OPT_TYPE_CONST, {.i64 = HLS_DISCONT_START }, 0, UINT_MAX, E, "flags"},
+ {"omit_endlist", "Do not append an endlist when ending stream", 0, AV_OPT_TYPE_CONST, {.i64 = HLS_OMIT_ENDLIST }, 0, UINT_MAX, E, "flags"},
{ NULL },
};