diff mbox series

[FFmpeg-devel] libavformat/hlsenc: Remove duplicate close of the output stream.

Message ID 20200701145901.49590-1-andrey.semashev@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] libavformat/hlsenc: Remove duplicate close of the output stream. | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andrey Semashev July 1, 2020, 2:59 p.m. UTC
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 | 1 -
 1 file changed, 1 deletion(-)

Comments

Andrey Semashev July 5, 2020, 11:55 a.m. UTC | #1
Ping?

On 2020-07-01 17:59, Andrey Semashev wrote:
> 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 | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 71fa3db060..88b58a1ba8 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -2631,7 +2631,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");
>
Steven Liu July 6, 2020, 3:31 a.m. UTC | #2
Andrey Semashev <andrey.semashev@gmail.com> 于2020年7月5日周日 下午8:25写道:
>
> Ping?
>
> On 2020-07-01 17:59, Andrey Semashev wrote:
> > 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 | 1 -
> >   1 file changed, 1 deletion(-)
> >
> > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> > index 71fa3db060..88b58a1ba8 100644
> > --- a/libavformat/hlsenc.c
> > +++ b/libavformat/hlsenc.c
> > @@ -2631,7 +2631,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");
> >
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

will apply


Thanks
Steven
diff mbox series

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 71fa3db060..88b58a1ba8 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2631,7 +2631,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");