Revision 7c892951

View differences:

libavformat/assdec.c
20 20
 */
21 21

  
22 22
#include "avformat.h"
23
#include "internal.h"
23 24

  
24 25
#define MAX_LINESIZE 2000
25 26

  
......
30 31
    unsigned int event_index;
31 32
}ASSContext;
32 33

  
33
static void ff_get_line(ByteIOContext *s, char *buf, int maxlen)
34
{
35
    int i = 0;
36
    char c;
37

  
38
    do{
39
        c = get_byte(s);
40
        if (i < maxlen-1)
41
            buf[i++] = c;
42
    }while(c != '\n' && c);
43

  
44
    buf[i] = 0;
45
}
46

  
47 34
static int probe(AVProbeData *p)
48 35
{
49 36
    const char *header= "[Script Info]";
libavformat/aviobuf.c
554 554
    return buf;
555 555
}
556 556

  
557
void ff_get_line(ByteIOContext *s, char *buf, int maxlen)
558
{
559
    int i = 0;
560
    char c;
561

  
562
    do {
563
        c = get_byte(s);
564
        if (i < maxlen-1)
565
            buf[i++] = c;
566
    } while (c != '\n' && c);
567

  
568
    buf[i] = 0;
569
}
570

  
557 571
uint64_t get_be64(ByteIOContext *s)
558 572
{
559 573
    uint64_t val;
libavformat/internal.h
167 167
 */
168 168
void ff_put_v(ByteIOContext *bc, uint64_t val);
169 169

  
170
void ff_get_line(ByteIOContext *s, char *buf, int maxlen);
171

  
170 172
#define SPACE_CHARS " \t\r\n"
171 173

  
172 174
#endif /* AVFORMAT_INTERNAL_H */

Also available in: Unified diff