mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 13:02:13 +00:00
avfilter/graphdump: Don't return truncated string
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
48348cd4ab
commit
76ff9640be
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user