Revision 60ff9de6
cmdutils.c | ||
---|---|---|
78 | 78 |
#if CONFIG_SWSCALE |
79 | 79 |
av_freep(&sws_opts); |
80 | 80 |
#endif |
81 |
for (i = 0; i < opt_name_count; i++) { |
|
82 |
//opt_values are only stored for codec-specific options in which case |
|
83 |
//both the name and value are dup'd |
|
84 |
if (opt_values[i]) { |
|
85 |
av_freep(&opt_names[i]); |
|
86 |
av_freep(&opt_values[i]); |
|
87 |
} |
|
88 |
} |
|
81 | 89 |
av_freep(&opt_names); |
82 | 90 |
av_freep(&opt_values); |
83 | 91 |
} |
... | ... | |
270 | 278 |
|
271 | 279 |
//FIXME we should always use avcodec_opts, ... for storing options so there will not be any need to keep track of what i set over this |
272 | 280 |
opt_values= av_realloc(opt_values, sizeof(void*)*(opt_name_count+1)); |
273 |
opt_values[opt_name_count]= o ? NULL : arg;
|
|
281 |
opt_values[opt_name_count]= o ? NULL : av_strdup(arg);
|
|
274 | 282 |
opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1)); |
275 |
opt_names[opt_name_count++]= o ? o->name : opt;
|
|
283 |
opt_names[opt_name_count++]= o ? o->name : av_strdup(opt);
|
|
276 | 284 |
|
277 | 285 |
if ((*avcodec_opts && avcodec_opts[0]->debug) || (avformat_opts && avformat_opts->debug)) |
278 | 286 |
av_log_set_level(AV_LOG_DEBUG); |
Also available in: Unified diff