Re: [FFmpeg-devel] [PATCH 4/4] lavf/dashenc: Fix AVDictionary leaks in case of various init errors.
On 11/26/18 4:31 PM, Andrey Semashev wrote: > On Wed, Nov 21, 2018 at 3:45 PM Jeyapal, Karthick wrote: > > On 11/20/18 6:01 PM, Andrey Semashev wrote: > > > On 11/18/18 1:55 PM, Jeyapal, Karthick wrote: > > > > Thanks for sending these excellent patches. The entire patchset looks > > > > good to me. > > > > Also, many thanks for your patience and taking the earlier review > > > > comments in the right spirit. > > > > > > Ping for merging it then? > > Thanks for the ping. Pushed all the dashenc patches. > > Left out the dashdec patch, as its maintainer has not commented yet. Maybe > > we can wait for few more days before pushing the dashdec patch. > > Looks like noone will comment on the dashdec patch. Could you merge it, > please? Sure. Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] lavf/dashenc: Fix AVDictionary leaks in case of various init errors.
On Wed, Nov 21, 2018 at 3:45 PM Jeyapal, Karthick wrote: > On 11/20/18 6:01 PM, Andrey Semashev wrote: > > On 11/18/18 1:55 PM, Jeyapal, Karthick wrote: > > > Thanks for sending these excellent patches. The entire patchset looks > > > good to me. > > > Also, many thanks for your patience and taking the earlier review > > > comments in the right spirit. > > > > Ping for merging it then? > Thanks for the ping. Pushed all the dashenc patches. > Left out the dashdec patch, as its maintainer has not commented yet. Maybe we > can wait for few more days before pushing the dashdec patch. Looks like noone will comment on the dashdec patch. Could you merge it, please? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] lavf/dashenc: Fix AVDictionary leaks in case of various init errors.
On 11/20/18 6:01 PM, Andrey Semashev wrote: > On 11/18/18 1:55 PM, Jeyapal, Karthick wrote: > > Thanks for sending these excellent patches. The entire patchset looks good > > to me. > > Also, many thanks for your patience and taking the earlier review comments > > in the right spirit. > > Ping for merging it then? Thanks for the ping. Pushed all the dashenc patches. Left out the dashdec patch, as its maintainer has not commented yet. Maybe we can wait for few more days before pushing the dashdec patch. > > > On 11/17/18 11:10 PM, Andrey Semashev wrote: > >> --- > >> libavformat/dashenc.c | 13 +++-- > >> 1 file changed, 7 insertions(+), 6 deletions(-) > >> > >> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c > >> index f552503564..2c872f93a1 100644 > >> --- a/libavformat/dashenc.c > >> +++ b/libavformat/dashenc.c > >> @@ -833,12 +833,12 @@ static int write_manifest(AVFormatContext *s, int > >> final) > >> snprintf(temp_filename, sizeof(temp_filename), use_rename ? "%s.tmp" > >> : "%s", s->url); > >> set_http_options(, c); > >> ret = dashenc_io_open(s, >mpd_out, temp_filename, ); > >> +av_dict_free(); > >> if (ret < 0) { > >> av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", > >> temp_filename); > >> return ret; > >> } > >> out = c->mpd_out; > >> -av_dict_free(); > >> avio_printf(out, "\n"); > >> avio_printf(out, " >> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n; > >> "\txmlns=\"urn:mpeg:dash:schema:mpd:2011\"\n" > >> @@ -924,11 +924,11 @@ static int write_manifest(AVFormatContext *s, int > >> final) > >> > >> set_http_options(, c); > >> ret = dashenc_io_open(s, >m3u8_out, temp_filename, ); > >> +av_dict_free(); > >> if (ret < 0) { > >> av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", > >> temp_filename); > >> return ret; > >> } > >> -av_dict_free(); > >> > >> ff_hls_write_playlist_version(c->m3u8_out, 7); > >> > >> @@ -1122,9 +1122,9 @@ static int dash_init(AVFormatContext *s) > >> snprintf(filename, sizeof(filename), "%s%s", c->dirname, > >> os->initfile); > >> set_http_options(, c); > >> ret = s->io_open(s, >out, filename, AVIO_FLAG_WRITE, ); > >> +av_dict_free(); > >> if (ret < 0) > >> return ret; > >> -av_dict_free(); > >> os->init_start_pos = 0; > >> > >> if (c->format_options_str) { > >> @@ -1145,11 +1145,12 @@ static int dash_init(AVFormatContext *s) > >> av_dict_set_int(, "dash_track_number", i + 1, 0); > >> av_dict_set_int(, "live", 1, 0); > >> } > >> -if ((ret = avformat_init_output(ctx, )) < 0) > >> +ret = avformat_init_output(ctx, ); > >> +av_dict_free(); > >> +if (ret < 0) > >> return ret; > >> os->ctx_inited = 1; > >> avio_flush(ctx->pb); > >> -av_dict_free(); > >> > >> av_log(s, AV_LOG_VERBOSE, "Representation %d init segment will > >> be written to: %s\n", i, filename); > >> > >> @@ -1553,9 +1554,9 @@ static int dash_write_packet(AVFormatContext *s, > >> AVPacket *pkt) > >>use_rename ? "%s.tmp" : "%s", os->full_path); > >> set_http_options(, c); > >> ret = dashenc_io_open(s, >out, os->temp_path, ); > >> +av_dict_free(); > >> if (ret < 0) > >> return ret; > >> -av_dict_free(); > >> } > >> > >> //write out the data immediately in streaming mode > > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] lavf/dashenc: Fix AVDictionary leaks in case of various init errors.
On 11/18/18 1:55 PM, Jeyapal, Karthick wrote: Thanks for sending these excellent patches. The entire patchset looks good to me. Also, many thanks for your patience and taking the earlier review comments in the right spirit. Ping for merging it then? On 11/17/18 11:10 PM, Andrey Semashev wrote: --- libavformat/dashenc.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index f552503564..2c872f93a1 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -833,12 +833,12 @@ static int write_manifest(AVFormatContext *s, int final) snprintf(temp_filename, sizeof(temp_filename), use_rename ? "%s.tmp" : "%s", s->url); set_http_options(, c); ret = dashenc_io_open(s, >mpd_out, temp_filename, ); +av_dict_free(); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename); return ret; } out = c->mpd_out; -av_dict_free(); avio_printf(out, "\n"); avio_printf(out, "http://www.w3.org/2001/XMLSchema-instance\"\n; "\txmlns=\"urn:mpeg:dash:schema:mpd:2011\"\n" @@ -924,11 +924,11 @@ static int write_manifest(AVFormatContext *s, int final) set_http_options(, c); ret = dashenc_io_open(s, >m3u8_out, temp_filename, ); +av_dict_free(); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename); return ret; } -av_dict_free(); ff_hls_write_playlist_version(c->m3u8_out, 7); @@ -1122,9 +1122,9 @@ static int dash_init(AVFormatContext *s) snprintf(filename, sizeof(filename), "%s%s", c->dirname, os->initfile); set_http_options(, c); ret = s->io_open(s, >out, filename, AVIO_FLAG_WRITE, ); +av_dict_free(); if (ret < 0) return ret; -av_dict_free(); os->init_start_pos = 0; if (c->format_options_str) { @@ -1145,11 +1145,12 @@ static int dash_init(AVFormatContext *s) av_dict_set_int(, "dash_track_number", i + 1, 0); av_dict_set_int(, "live", 1, 0); } -if ((ret = avformat_init_output(ctx, )) < 0) +ret = avformat_init_output(ctx, ); +av_dict_free(); +if (ret < 0) return ret; os->ctx_inited = 1; avio_flush(ctx->pb); -av_dict_free(); av_log(s, AV_LOG_VERBOSE, "Representation %d init segment will be written to: %s\n", i, filename); @@ -1553,9 +1554,9 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt) use_rename ? "%s.tmp" : "%s", os->full_path); set_http_options(, c); ret = dashenc_io_open(s, >out, os->temp_path, ); +av_dict_free(); if (ret < 0) return ret; -av_dict_free(); } //write out the data immediately in streaming mode ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] lavf/dashenc: Fix AVDictionary leaks in case of various init errors.
Thanks for sending these excellent patches. The entire patchset looks good to me. Also, many thanks for your patience and taking the earlier review comments in the right spirit. Regards, Karthick On 11/17/18 11:10 PM, Andrey Semashev wrote: > --- > libavformat/dashenc.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c > index f552503564..2c872f93a1 100644 > --- a/libavformat/dashenc.c > +++ b/libavformat/dashenc.c > @@ -833,12 +833,12 @@ static int write_manifest(AVFormatContext *s, int final) > snprintf(temp_filename, sizeof(temp_filename), use_rename ? "%s.tmp" : > "%s", s->url); > set_http_options(, c); > ret = dashenc_io_open(s, >mpd_out, temp_filename, ); > +av_dict_free(); > if (ret < 0) { > av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", > temp_filename); > return ret; > } > out = c->mpd_out; > -av_dict_free(); > avio_printf(out, "\n"); > avio_printf(out, " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n; > "\txmlns=\"urn:mpeg:dash:schema:mpd:2011\"\n" > @@ -924,11 +924,11 @@ static int write_manifest(AVFormatContext *s, int final) > > set_http_options(, c); > ret = dashenc_io_open(s, >m3u8_out, temp_filename, ); > +av_dict_free(); > if (ret < 0) { > av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", > temp_filename); > return ret; > } > -av_dict_free(); > > ff_hls_write_playlist_version(c->m3u8_out, 7); > > @@ -1122,9 +1122,9 @@ static int dash_init(AVFormatContext *s) > snprintf(filename, sizeof(filename), "%s%s", c->dirname, > os->initfile); > set_http_options(, c); > ret = s->io_open(s, >out, filename, AVIO_FLAG_WRITE, ); > +av_dict_free(); > if (ret < 0) > return ret; > -av_dict_free(); > os->init_start_pos = 0; > > if (c->format_options_str) { > @@ -1145,11 +1145,12 @@ static int dash_init(AVFormatContext *s) > av_dict_set_int(, "dash_track_number", i + 1, 0); > av_dict_set_int(, "live", 1, 0); > } > -if ((ret = avformat_init_output(ctx, )) < 0) > +ret = avformat_init_output(ctx, ); > +av_dict_free(); > +if (ret < 0) > return ret; > os->ctx_inited = 1; > avio_flush(ctx->pb); > -av_dict_free(); > > av_log(s, AV_LOG_VERBOSE, "Representation %d init segment will be > written to: %s\n", i, filename); > > @@ -1553,9 +1554,9 @@ static int dash_write_packet(AVFormatContext *s, > AVPacket *pkt) > use_rename ? "%s.tmp" : "%s", os->full_path); > set_http_options(, c); > ret = dashenc_io_open(s, >out, os->temp_path, ); > +av_dict_free(); > if (ret < 0) > return ret; > -av_dict_free(); > } > > //write out the data immediately in streaming mode ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 4/4] lavf/dashenc: Fix AVDictionary leaks in case of various init errors.
--- libavformat/dashenc.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index f552503564..2c872f93a1 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -833,12 +833,12 @@ static int write_manifest(AVFormatContext *s, int final) snprintf(temp_filename, sizeof(temp_filename), use_rename ? "%s.tmp" : "%s", s->url); set_http_options(, c); ret = dashenc_io_open(s, >mpd_out, temp_filename, ); +av_dict_free(); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename); return ret; } out = c->mpd_out; -av_dict_free(); avio_printf(out, "\n"); avio_printf(out, "http://www.w3.org/2001/XMLSchema-instance\"\n; "\txmlns=\"urn:mpeg:dash:schema:mpd:2011\"\n" @@ -924,11 +924,11 @@ static int write_manifest(AVFormatContext *s, int final) set_http_options(, c); ret = dashenc_io_open(s, >m3u8_out, temp_filename, ); +av_dict_free(); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename); return ret; } -av_dict_free(); ff_hls_write_playlist_version(c->m3u8_out, 7); @@ -1122,9 +1122,9 @@ static int dash_init(AVFormatContext *s) snprintf(filename, sizeof(filename), "%s%s", c->dirname, os->initfile); set_http_options(, c); ret = s->io_open(s, >out, filename, AVIO_FLAG_WRITE, ); +av_dict_free(); if (ret < 0) return ret; -av_dict_free(); os->init_start_pos = 0; if (c->format_options_str) { @@ -1145,11 +1145,12 @@ static int dash_init(AVFormatContext *s) av_dict_set_int(, "dash_track_number", i + 1, 0); av_dict_set_int(, "live", 1, 0); } -if ((ret = avformat_init_output(ctx, )) < 0) +ret = avformat_init_output(ctx, ); +av_dict_free(); +if (ret < 0) return ret; os->ctx_inited = 1; avio_flush(ctx->pb); -av_dict_free(); av_log(s, AV_LOG_VERBOSE, "Representation %d init segment will be written to: %s\n", i, filename); @@ -1553,9 +1554,9 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt) use_rename ? "%s.tmp" : "%s", os->full_path); set_http_options(, c); ret = dashenc_io_open(s, >out, os->temp_path, ); +av_dict_free(); if (ret < 0) return ret; -av_dict_free(); } //write out the data immediately in streaming mode -- 2.19.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel