summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/assdec.c15
-rw-r--r--libavformat/aviobuf.c14
-rw-r--r--libavformat/internal.h2
3 files changed, 17 insertions, 14 deletions
diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index 0fc9e8a772..ecc9a07888 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#define MAX_LINESIZE 2000
@@ -30,20 +31,6 @@ typedef struct ASSContext{
unsigned int event_index;
}ASSContext;
-static 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;
-}
-
static int probe(AVProbeData *p)
{
const char *header= "[Script Info]";
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;
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 29d735ceac..5833ef0229 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -167,6 +167,8 @@ int ff_get_v_length(uint64_t val);
*/
void ff_put_v(ByteIOContext *bc, uint64_t val);
+void ff_get_line(ByteIOContext *s, char *buf, int maxlen);
+
#define SPACE_CHARS " \t\r\n"
#endif /* AVFORMAT_INTERNAL_H */