28 unsigned char *ptr = p->
buf;
35 if (num == i && sscanf(ptr,
"%*d:%*2d:%*2d%*1[,.]%*3d --> %*d:%*2d:%*2d%*1[,.]%3d", &v) == 1)
38 ptr += strcspn(ptr,
"\n") + 1;
56 int i,
v, hour,
min, sec, hsec;
59 if (sscanf(buf,
"%d:%2d:%2d%*1[,.]%3d --> %*d:%*2d:%*2d%*1[,.]%3d",
60 &hour, &min, &sec, &hsec, &v) == 5) {
65 buf += strcspn(buf,
"\n") + 1;
72 return c ==
'\r' || c ==
'\n';
87 memcpy(pkt->
data, buffer, pkt->
size);
int64_t pos
byte position in stream, -1 if unknown
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
int flags
A combination of AV_PKT_FLAG values.
AVCodecContext * codec
codec context
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int ff_get_line(AVIOContext *s, char *buf, int maxlen)
Read a whole line of text from AVIOContext.
enum AVMediaType codec_type
This structure contains the data a format has to probe a file.
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_RB24
int eof_reached
true if eof reached
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define AV_NOPTS_VALUE
Undefined timestamp value.