summaryrefslogtreecommitdiff
path: root/libavformat/internal.h
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-04-09 23:05:42 +0800
committerJun Zhao <jun.zhao@intel.com>2018-04-12 16:04:58 +0800
commitcdd107b96586916508f8665b08be7de54d9633cf (patch)
treedb8cd45be9bd0954d55f3a28407a530c0bd8da26 /libavformat/internal.h
parentbc62d20dc415caf949b6452b2707b9eba78cb098 (diff)
lavf/aviobuf: add ff_get_chomp_line
Same as ff_get_line but strip the white-space characters in the string tail. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r--libavformat/internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index c50382ad29..3582682925 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -300,6 +300,16 @@ void ff_put_v(AVIOContext *bc, uint64_t val);
int ff_get_line(AVIOContext *s, char *buf, int maxlen);
/**
+ * Same as ff_get_line but strip the white-space characters in the text tail
+ *
+ * @param s the read-only AVIOContext
+ * @param buf buffer to store the read line
+ * @param maxlen size of the buffer
+ * @return the length of the string written in the buffer
+ */
+int ff_get_chomp_line(AVIOContext *s, char *buf, int maxlen);
+
+/**
* Read a whole line of text from AVIOContext to an AVBPrint buffer. Stop
* reading after reaching a \\r, a \\n, a \\r\\n, a \\0 or EOF. The line
* ending characters are NOT included in the buffer, but they are skipped on