Commit 76ff9640 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avfilter/graphdump: Don't return truncated string

Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent 48348cd4
......@@ -159,8 +159,10 @@ char *avfilter_graph_dump(AVFilterGraph *graph, const char *options)
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_COUNT_ONLY);
avfilter_graph_dump_to_buf(&buf, graph);
av_bprint_init(&buf, buf.len + 1, buf.len + 1);
dump = av_malloc(buf.len + 1);
if (!dump)
return NULL;
av_bprint_init_for_buffer(&buf, dump, buf.len + 1);
avfilter_graph_dump_to_buf(&buf, graph);
av_bprint_finalize(&buf, &dump);
return dump;
}
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