mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
avformat/hlsenc: do not append an endlist tag when the stream ends
Reviewed-by: Thomas Volkert <silvo@gmx.net>
This commit is contained in:
parent
572a8292cb
commit
4f2fcac290
@ -52,6 +52,7 @@ typedef enum HLSFlags {
|
|||||||
HLS_DELETE_SEGMENTS = (1 << 1),
|
HLS_DELETE_SEGMENTS = (1 << 1),
|
||||||
HLS_ROUND_DURATIONS = (1 << 2),
|
HLS_ROUND_DURATIONS = (1 << 2),
|
||||||
HLS_DISCONT_START = (1 << 3),
|
HLS_DISCONT_START = (1 << 3),
|
||||||
|
HLS_OMIT_ENDLIST = (1 << 4),
|
||||||
} HLSFlags;
|
} HLSFlags;
|
||||||
|
|
||||||
typedef struct HLSContext {
|
typedef struct HLSContext {
|
||||||
@ -293,7 +294,7 @@ static int hls_window(AVFormatContext *s, int last)
|
|||||||
avio_printf(out, "%s\n", en->filename);
|
avio_printf(out, "%s\n", en->filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last)
|
if (last && (hls->flags & HLS_OMIT_ENDLIST)==0)
|
||||||
avio_printf(out, "#EXT-X-ENDLIST\n");
|
avio_printf(out, "#EXT-X-ENDLIST\n");
|
||||||
|
|
||||||
fail:
|
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"},
|
{"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"},
|
{"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"},
|
{"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 },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user