[FFmpeg-devel] [PATCH 1/2] avformat/dashenc: Fix a resource leak when http persistent in enabled
刘歧
lq at chinaffmpeg.org
Tue Jan 2 10:11:25 EET 2018
> On 2 Jan 2018, at 14:48, Karthick J <kjeyapal at akamai.com> wrote:
>
> From: Karthick Jeyapal <kjeyapal at akamai.com>
>
> ---
> libavformat/dashenc.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 3345b89..c4c112b 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -1,6 +1,7 @@
> /*
> * MPEG-DASH ISO BMFF segmenter
> * Copyright (c) 2014 Martin Storsjo
> + * Copyright (c) 2018 Akamai Technologies, Inc.
> *
> * This file is part of FFmpeg.
> *
> @@ -1317,6 +1318,16 @@ static int dash_write_trailer(AVFormatContext *s)
> }
> dash_flush(s, 1, -1);
>
> + if (c->http_persistent) {
> + int i;
> + for (i = 0; i < s->nb_streams; i++) {
> + OutputStream *os = &c->streams[i];
> + ff_format_io_close(s, &os->out);
> + }
> + ff_format_io_close(s, &c->mpd_out);
> + ff_format_io_close(s, &c->m3u8_out);
> + }
> +
> if (c->remove_at_exit) {
> char filename[1024];
> int i;
> --
> 1.9.1
>
LGTM
Thanks
Steven
More information about the ffmpeg-devel
mailing list