Revision 7c892951 libavformat/assdec.c

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]";

Also available in: Unified diff