53 }
while (!s->
eof_reached && (buf[0] ==
';' || buf[0] ==
'#' || buf[0] == 0));
64 if (sscanf(line,
"TIMEBASE=%d/%d", &tb.
num, &tb.
den))
66 if (!sscanf(line,
"START=%"SCNd64, &start)) {
73 if (!sscanf(line,
"END=%"SCNd64, &end)) {
84 uint8_t *p1 = ret, *p2 = buf;
89 while (p2 < buf + size) {
100 uint8_t *key, *value, *p = line;
115 if (!(key =
unescape(line, p - line)))
117 if (!(value =
unescape(p + 1, strlen(p + 1)))) {
170 .
name =
"ffmetadata",
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() and children.
Opaque data information usually continuous.
#define AVERROR_EOF
End of file.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
Dummy codec for streams containing only metadata information.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
codec context
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() and chilren.
int64_t end
chapter start/end time in time_base units
enum AVMediaType codec_type
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
rational number numerator/denominator
This structure contains the data a format has to probe a file.
int64_t start_time
Decoding: position of the first frame of the component, in AV_TIME_BASE fractional seconds...
AVRational time_base
time base in which the start/end timestamps are specified
int eof_reached
true if eof reached
int64_t duration
Decoding: duration of the stream, in AV_TIME_BASE fractional seconds.
#define AV_NOPTS_VALUE
Undefined timestamp value.