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:
authorJan Ekström <jan.ekstrom@24i.com>2021-09-20 14:30:14 +0300
committerJan Ekström <jeebjp@gmail.com>2021-10-04 17:13:21 +0300
commit151f46e84ddce557aace102a9f86f72d37e1cdbf (patch)
tree17a92fca4f643795b974558af7418a63e5447b66 /libavformat/avio_internal.h
parent94f227bac1c0189d5a270322398bfa4ffa6ad196 (diff)
avformat/{aviobuf,avio_internal}: add ff_read_string_to_bprint_overwrite
For now, same as ff_read_line_to_bprint_overwrite, but reads until the end of a null-terminated string. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
Diffstat (limited to 'libavformat/avio_internal.h')
-rw-r--r--libavformat/avio_internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 11060e9ff9..238b007396 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -245,4 +245,16 @@ struct AVBPrint;
*/
int64_t ff_read_line_to_bprint_overwrite(AVIOContext *s, struct AVBPrint *bp);
+/**
+ * Read a whole null-terminated string of text from AVIOContext to an AVBPrint
+ * buffer overwriting its contents. Stop reading after reaching a \\0 or
+ * EOF.
+ *
+ * @param s the read-only AVIOContext
+ * @param bp the AVBPrint buffer
+ * @return the length of the read string not including the terminating null,
+ * negative on error, or if the buffer becomes truncated.
+ */
+int64_t ff_read_string_to_bprint_overwrite(AVIOContext *s, AVBPrint *bp);
+
#endif /* AVFORMAT_AVIO_INTERNAL_H */