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>
This commit is contained in:
Martin Storsjö 2024-06-20 16:35:20 +03:00
parent a50b8bb7cd
commit 9246cca7f7
1 changed files with 1 additions and 0 deletions

View File

@ -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,"