aboutsummaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorAurelien Jacobs2010-07-21 21:39:01 +0000
committerAurelien Jacobs2010-07-21 21:39:01 +0000
commit7c89295145559b269cf8e257b735386016ef1814 (patch)
treeaf29e4d793271e6205593a5b54e152055306a714 /libavformat/aviobuf.c
parent80769fb73f20829cd2c1a0e8e56d41204b487049 (diff)
move ff_get_line to aviobuf.c
Originally committed as revision 24399 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 31ce64e581..264d2def41 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -554,6 +554,20 @@ char *get_strz(ByteIOContext *s, char *buf, int maxlen)
return buf;
}
+void ff_get_line(ByteIOContext *s, char *buf, int maxlen)
+{
+ int i = 0;
+ char c;
+
+ do {
+ c = get_byte(s);
+ if (i < maxlen-1)
+ buf[i++] = c;
+ } while (c != '\n' && c);
+
+ buf[i] = 0;
+}
+
uint64_t get_be64(ByteIOContext *s)
{
uint64_t val;