snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
ret = avfilter_graph_create_filter(&ofilter->filter,
avfilter_get_by_name("ffbuffersink"),
- name, NULL, NULL/*buffersink_params*/, fg->graph);
+ name, NULL, NULL, fg->graph);
av_freep(&buffersink_params);
if (ret < 0)
if (sample_fmts || sample_rates || channel_layouts) {
AVFilterContext *format;
char args[256];
- int len = 0;
+ args[0] = 0;
if (sample_fmts)
- len += snprintf(args + len, sizeof(args) - len, "sample_fmts=%s:",
+ av_strlcatf(args, sizeof(args), "sample_fmts=%s:",
sample_fmts);
if (sample_rates)
- len += snprintf(args + len, sizeof(args) - len, "sample_rates=%s:",
+ av_strlcatf(args, sizeof(args), "sample_rates=%s:",
sample_rates);
if (channel_layouts)
- len += snprintf(args + len, sizeof(args) - len, "channel_layouts=%s:",
+ av_strlcatf(args, sizeof(args), "channel_layouts=%s:",
channel_layouts);
- args[len - 1] = 0;
av_freep(&sample_fmts);
av_freep(&sample_rates);