49 end = prev !=
'\\' && (
c ==
'\r' ||
c ==
'\n' ||
c ==
'\0');
53 }
while (!end &&
len <
sizeof(
tmp));
76 }
while (!
avio_feof(
s) && (bp->str[0] ==
';' || bp->str[0] ==
'#' || bp->str[0] == 0));
97 }
while (!
avio_feof(
s) && (buf[0] ==
';' || buf[0] ==
'#' || buf[0] == 0));
109 if (sscanf(
line,
"TIMEBASE=%d/%d", &tb.
num, &tb.
den))
111 ret = sscanf(
line,
"START=%"SCNd64, &start);
114 start = (
s->nb_chapters &&
s->chapters[
s->nb_chapters - 1]->end !=
AV_NOPTS_VALUE) ?
115 s->chapters[
s->nb_chapters - 1]->end : 0;
119 ret = sscanf(
line,
"END=%"SCNd64, &end);
132 const uint8_t *p2 = buf;
137 while (p2 < buf +
size) {
149 const uint8_t *p =
line;
211 s->chapters[
s->nb_chapters - 1]->time_base,
227 .p.name =
"ffmetadata",
static int probe(const AVProbeData *p)
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)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static uint32_t BS_FUNC read(BSCTX *bc, unsigned int n)
Return n bits from the buffer, n has to be in the 0-32 range.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AV_BPRINT_SIZE_UNLIMITED
#define i(width, name, range_min, range_max)
AVChapter * avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base, int64_t start, int64_t end, const char *title)
Add a new chapter.
static int read_header(FFV1Context *f, RangeCoder *c)
@ AV_CODEC_ID_FFMETADATA
Dummy codec for streams containing only metadata information.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
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_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.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Memory handling functions.
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.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.