Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-02 18:51:17 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-03 18:58:43 +0300
commit84f037edc2065db348879a9312720a93e54a4942 (patch)
tree46ffcadb7d1c9609889fe1ef31d7c74d1012722a /libavdevice/lavfi.c
parentefc323062c20aaead8fb5805b7f69b4f071cb319 (diff)
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>
Diffstat (limited to 'libavdevice/lavfi.c')
-rw-r--r--libavdevice/lavfi.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index d9083ad984..2659c8508a 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -156,9 +156,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
av_bprint_init(&graph_file_pb, 0, AV_BPRINT_SIZE_UNLIMITED);
ret = avio_read_to_bprint(avio, &graph_file_pb, INT_MAX);
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) {
av_bprint_finalize(&graph_file_pb, NULL);
goto end;