Commit faf8d3dd authored by Ronald S. Bultje's avatar Ronald S. Bultje

cmdutils: use sws_freeContext() instead of av_freep().

av_freep(swsContext) will leak all memory potentially
allocated within the swsContext.
parent 389e2000
...@@ -76,7 +76,8 @@ void uninit_opts(void) ...@@ -76,7 +76,8 @@ void uninit_opts(void)
av_freep(&avformat_opts->key); av_freep(&avformat_opts->key);
av_freep(&avformat_opts); av_freep(&avformat_opts);
#if CONFIG_SWSCALE #if CONFIG_SWSCALE
av_freep(&sws_opts); sws_freeContext(sws_opts);
sws_opts = NULL;
#endif #endif
for (i = 0; i < opt_name_count; i++) { for (i = 0; i < opt_name_count; i++) {
//opt_values are only stored for codec-specific options in which case //opt_values are only stored for codec-specific options in which case
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment