av_freep(swsContext) will leak all memory potentially
allocated within the swsContext.
av_freep(&avformat_opts->key);
av_freep(&avformat_opts);
#if CONFIG_SWSCALE
av_freep(&avformat_opts->key);
av_freep(&avformat_opts);
#if CONFIG_SWSCALE
+ sws_freeContext(sws_opts);
+ sws_opts = NULL;
#endif
for (i = 0; i < opt_name_count; i++) {
//opt_values are only stored for codec-specific options in which case
#endif
for (i = 0; i < opt_name_count; i++) {
//opt_values are only stored for codec-specific options in which case