48 end = prev !=
'\\' && (
c ==
'\r' ||
c ==
'\n' ||
c ==
'\0');
52 }
while (!end &&
len <
sizeof(
tmp));
75 }
while (!
avio_feof(
s) && (bp->str[0] ==
';' || bp->str[0] ==
'#' || bp->str[0] == 0));
96 }
while (!
avio_feof(
s) && (buf[0] ==
';' || buf[0] ==
'#' || buf[0] == 0));
108 if (sscanf(
line,
"TIMEBASE=%d/%d", &
tb.num, &
tb.den))
110 ret = sscanf(
line,
"START=%"SCNd64, &start);
113 start = (
s->nb_chapters &&
s->chapters[
s->nb_chapters - 1]->end !=
AV_NOPTS_VALUE) ?
114 s->chapters[
s->nb_chapters - 1]->end : 0;
118 ret = sscanf(
line,
"END=%"SCNd64, &end);
136 while (p2 < buf +
size) {
210 s->chapters[
s->nb_chapters - 1]->time_base,
226 .
name =
"ffmetadata",
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int avio_r8(AVIOContext *s)
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size)
Append data to a print buffer.
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
#define AV_BPRINT_SIZE_UNLIMITED
@ AV_CODEC_ID_FFMETADATA
Dummy codec for streams containing only metadata information.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function.
#define AVERROR_EOF
End of file.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
enum AVMediaType codec_type
General type of the encoded data.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
This structure contains the data a format has to probe a file.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.