From: Jun Zhao <barryjz...@tencent.com> In case of failure, all the successfully set entries are stored in *pm. We need to manually free the created dictionary to avoid memory leak.
Signed-off-by: Jun Zhao <barryjz...@tencent.com> --- libavformat/dashenc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 8c28fb6..c37678d 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -1305,8 +1305,10 @@ static int dash_init(AVFormatContext *s) if (c->format_options_str) { ret = av_dict_parse_string(&opts, c->format_options_str, "=", ":", 0); - if (ret < 0) + if (ret < 0) { + av_dict_free(&opts); return ret; + } } if (os->segment_type == SEGMENT_TYPE_MP4) { -- 1.7.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".