]> git.sesse.net Git - ffmpeg/commitdiff
libavformat/hlsenc: Remove duplicate close of the output stream.
authorAndrey Semashev <andrey.semashev@gmail.com>
Wed, 1 Jul 2020 14:59:01 +0000 (17:59 +0300)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 6 Jul 2020 07:16:45 +0000 (15:16 +0800)
The result of the first close attempt is ignored and may be lost. By removing
it we ensure the close result code is properly analyzed.

libavformat/hlsenc.c

index 0a318d29ffca94847a99cb98cd9d7ccb14f05887..3398f0e732af1c195d6495554a79e9d2245a9af5 100644 (file)
@@ -2629,7 +2629,6 @@ static int hls_write_trailer(struct AVFormatContext *s)
             goto failed;
 
         vs->size = range_length;
-        hlsenc_io_close(s, &vs->out, filename);
         ret = hlsenc_io_close(s, &vs->out, filename);
         if (ret < 0) {
             av_log(s, AV_LOG_WARNING, "upload segment failed, will retry with a new http session.\n");