diff options
author | Martin Storsjö <martin@martin.st> | 2024-06-20 16:35:20 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2024-07-04 23:33:26 +0300 |
commit | 9246cca7f7db87ff972350d279c867b03eb8ef72 (patch) | |
tree | c2fca11adc0a7e07b08ea45bda86ca53b6b90595 | |
parent | a50b8bb7cd92761043a62590958c9d570c756f30 (diff) | |
download | ffmpeg-9246cca7f7db87ff972350d279c867b03eb8ef72.tar.gz |
hlsenc: When not using HLS_SINGLE_FILE, set vs->size to range_length
This matches what is done in the corresponding case for
HLS_SINGLE_FILE.
Normally, vs->size is already initialized correctly - but when
writing the initial segment, with mp4 files, vs->size has been set
to the size of the init segment, while range_length contains the
real size of the first segment.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/hlsenc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index e9aff1d0f7..7c8c886fc3 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2587,6 +2587,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) av_dict_free(&options); return ret; } + vs->size = range_length; ret = hlsenc_io_close(s, &vs->out, filename); if (ret < 0) { av_log(s, AV_LOG_WARNING, "upload segment failed," |