You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avdevice/lavfi: Don't unnecessarily write '\0' to AVBPrint
An AVBPrint's internal string is always already zero-terminated; writing another '\0' is unnecessary as long as one treats the string only as a C-string. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -156,9 +156,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
|
|||||||
av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED);
|
av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED);
|
||||||
ret = avio_read_to_bprint(avio, &graph_file_pb, INT_MAX);
|
ret = avio_read_to_bprint(avio, &graph_file_pb, INT_MAX);
|
||||||
avio_closep(&avio);
|
avio_closep(&avio);
|
||||||
av_bprint_chars(&graph_file_pb, '\0', 1);
|
|
||||||
if (!ret && !av_bprint_is_complete(&graph_file_pb))
|
|
||||||
ret = AVERROR(ENOMEM);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
av_bprint_finalize(&graph_file_pb, NULL);
|
av_bprint_finalize(&graph_file_pb, NULL);
|
||||||
goto end;
|
goto end;
|
||||||
|
Reference in New Issue
Block a user