move ff_get_line to aviobuf.c
Originally committed as revision 24399 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
80769fb73f
commit
7c89295145
@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
#include "internal.h"
|
||||||
|
|
||||||
#define MAX_LINESIZE 2000
|
#define MAX_LINESIZE 2000
|
||||||
|
|
||||||
@ -30,20 +31,6 @@ typedef struct ASSContext{
|
|||||||
unsigned int event_index;
|
unsigned int event_index;
|
||||||
}ASSContext;
|
}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)
|
static int probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
const char *header= "[Script Info]";
|
const char *header= "[Script Info]";
|
||||||
|
@ -554,6 +554,20 @@ char *get_strz(ByteIOContext *s, char *buf, int maxlen)
|
|||||||
return buf;
|
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 get_be64(ByteIOContext *s)
|
||||||
{
|
{
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
|
@ -167,6 +167,8 @@ int ff_get_v_length(uint64_t val);
|
|||||||
*/
|
*/
|
||||||
void ff_put_v(ByteIOContext *bc, 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"
|
#define SPACE_CHARS " \t\r\n"
|
||||||
|
|
||||||
#endif /* AVFORMAT_INTERNAL_H */
|
#endif /* AVFORMAT_INTERNAL_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user