[FFmpeg-cvslog] r24399 - in trunk/libavformat: assdec.c aviobuf.c internal.h
aurel
subversion
Wed Jul 21 23:39:01 CEST 2010
Author: aurel
Date: Wed Jul 21 23:39:01 2010
New Revision: 24399
Log:
move ff_get_line to aviobuf.c
Modified:
trunk/libavformat/assdec.c
trunk/libavformat/aviobuf.c
trunk/libavformat/internal.h
Modified: trunk/libavformat/assdec.c
==============================================================================
--- trunk/libavformat/assdec.c Wed Jul 21 23:35:44 2010 (r24398)
+++ trunk/libavformat/assdec.c Wed Jul 21 23:39:01 2010 (r24399)
@@ -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]";
Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c Wed Jul 21 23:35:44 2010 (r24398)
+++ trunk/libavformat/aviobuf.c Wed Jul 21 23:39:01 2010 (r24399)
@@ -554,6 +554,20 @@ char *get_strz(ByteIOContext *s, char *b
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;
Modified: trunk/libavformat/internal.h
==============================================================================
--- trunk/libavformat/internal.h Wed Jul 21 23:35:44 2010 (r24398)
+++ trunk/libavformat/internal.h Wed Jul 21 23:39:01 2010 (r24399)
@@ -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 */
More information about the ffmpeg-cvslog
mailing list