84 #define MAX_ODML_DEPTH 1000 
  104     { 
'R', 
'I', 
'F', 
'F', 
'A', 
'V', 
'I', 
' '  },
 
  105     { 
'R', 
'I', 
'F', 
'F', 
'A', 
'V', 
'I', 
'X'  },
 
  106     { 
'R', 
'I', 
'F', 
'F', 
'A', 
'V', 
'I', 0x19 },
 
  107     { 
'O', 
'N', 
'2', 
' ', 
'O', 
'N', 
'2', 
'f'  },
 
  108     { 
'R', 
'I', 
'F', 
'F', 
'A', 
'M', 
'V', 
' '  },
 
  120 #define print_tag(str, tag, size)                        \ 
  121     av_log(NULL, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%c%c%c%c size=0x%x\n", \ 
  122             avio_tell(pb), str, tag & 0xff,              \ 
  124             (tag >> 16) & 0xff,                          \ 
  125             (tag >> 24) & 0xff,                          \ 
  156     if (header[7] == 0x19)
 
  158                "This file has been generated by a totally broken muxer.\n");
 
  168     int index_sub_type  = 
avio_r8(pb);
 
  173     int stream_id       = ((chunk_id      & 0xFF) - 
'0') * 10 +
 
  174                           ((chunk_id >> 8 & 0xFF) - 
'0');
 
  178     int64_t last_pos = -1;
 
  179     int64_t filesize = avi->
fsize;
 
  182             "longs_pre_entry:%d index_type:%d entries_in_use:%d " 
  183             "chunk_id:%X base:%16"PRIX64
" frame_num:%d\n",
 
  191     if (stream_id >= s->
nb_streams || stream_id < 0)
 
  201     if (index_type && longs_pre_entry != 2)
 
  206     if (filesize > 0 && base >= filesize) {
 
  208         if (base >> 32 == (base & 0xFFFFFFFF) &&
 
  209             (base & 0xFFFFFFFF) < filesize    &&
 
  210             filesize <= 0xFFFFFFFF)
 
  216     for (i = 0; i < entries_in_use; i++) {
 
  228             if (last_pos == pos || pos == base - 8)
 
  230             if (last_pos != pos && len)
 
  253             if (
avio_seek(pb, offset + 8, SEEK_SET) < 0)
 
  281         int64_t pos, 
size, ts;
 
  293         for (j = 0; j < 
size; j += max)
 
  308     if (size == UINT_MAX)
 
  323 static const char months[12][4] = { 
"Jan", 
"Feb", 
"Mar", 
"Apr", 
"May", 
"Jun",
 
  324                                     "Jul", 
"Aug", 
"Sep", 
"Oct", 
"Nov", 
"Dec" };
 
  328     char month[4], time[9], 
buffer[64];
 
  331     if (sscanf(date, 
"%*3s%*[ ]%3s%*[ ]%2d%*[ ]%8s%*[ ]%4d",
 
  332                month, &day, time, &year) == 4) {
 
  333         for (i = 0; i < 12; i++)
 
  335                 snprintf(buffer, 
sizeof(buffer), 
"%.4d-%.2d-%.2d %s",
 
  336                          year, i + 1, day, time);
 
  339     } 
else if (date[4] == 
'/' && date[7] == 
'/') {
 
  340         date[4] = date[7] = 
'-';
 
  351         case MKTAG(
'n', 
'c', 
't', 
'g'):  
 
  361                                   FFMIN(size, 
sizeof(buffer) - 1));
 
  370                     name = 
"creation_time";
 
  371                     if (buffer[4] == 
':' && buffer[7] == 
':')
 
  372                         buffer[4] = buffer[7] = 
'-';
 
  395     if (!data || data_size < 8) {
 
  401     tag = bytestream2_get_le32(&gb);
 
  404     case MKTAG(
'A', 
'V', 
'I', 
'F'):
 
  413     case MKTAG(
'C', 
'A', 
'S', 
'I'):
 
  416     case MKTAG(
'Z', 
'o', 
'r', 
'a'):
 
  445     if (maxpos < avi->io_fsize*9/10) 
 
  447     if (lensum*9/10 > maxpos || lensum < maxpos*9/10) 
 
  463         if (bitrate <= INT_MAX && bitrate > 0) {
 
  480     int avih_width      = 0, avih_height = 0;
 
  481     int amv_file_format = 0;
 
  482     uint64_t list_end   = 0;
 
  512         case MKTAG(
'L', 
'I', 
'S', 
'T'):
 
  519             if (tag1 == 
MKTAG(
'm', 
'o', 
'v', 
'i')) {
 
  527             } 
else if (tag1 == 
MKTAG(
'I', 
'N', 
'F', 
'O'))
 
  529             else if (tag1 == 
MKTAG(
'n', 
'c', 
'd', 
't'))
 
  533         case MKTAG(
'I', 
'D', 
'I', 
'T'):
 
  535             unsigned char date[64] = { 0 };
 
  542         case MKTAG(
'd', 
'm', 
'l', 
'h'):
 
  546         case MKTAG(
'a', 
'm', 
'v', 
'h'):
 
  548         case MKTAG(
'a', 
'v', 
'i', 
'h'):
 
  564         case MKTAG(
's', 
't', 
'r', 
'h'):
 
  570             if (tag1 == 
MKTAG(
'p', 
'a', 
'd', 
's')) {
 
  579                 st->
id = stream_index;
 
  586                 tag1 = stream_index ? 
MKTAG(
'a', 
'u', 
'd', 
's')
 
  587                                     : 
MKTAG(
'v', 
'i', 
'd', 
's');
 
  591             if (tag1 == 
MKTAG(
'i', 
'a', 
'v', 
's') ||
 
  592                 tag1 == 
MKTAG(
'i', 
'v', 
'a', 
's')) {
 
  600                 if (handler != 
MKTAG(
'd', 
'v', 
's', 
'd') &&
 
  601                     handler != 
MKTAG(
'd', 
'v', 
'h', 
'd') &&
 
  602                     handler != 
MKTAG(
'd', 
'v', 
's', 
'l'))
 
  613                 if (CONFIG_DV_DEMUXER) {
 
  626                 if (ast->
scale > 0 && ast->
rate > 0 && dv_dur > 0) {
 
  649                        "scale/rate is %"PRIu32
"/%"PRIu32
" which is invalid. " 
  650                        "(This file has been generated by broken software.)\n",
 
  655                     ast->
scale = frame_period;
 
  679             case MKTAG(
'v', 
'i', 
'd', 
's'):
 
  685             case MKTAG(
'a', 
'u', 
'd', 
's'):
 
  688             case MKTAG(
't', 
'x', 
't', 
's'):
 
  691             case MKTAG(
'd', 
'a', 
't', 
's'):
 
  701                            "Invalid sample_size %d at stream %d\n",
 
  707                        "Invalid sample_size %d at stream %d " 
  724         case MKTAG(
's', 
't', 
'r', 
'f'):
 
  733                 if (cur_pos < list_end)
 
  734                     size = 
FFMIN(size, list_end - cur_pos);
 
  740                 switch (codec_type) {
 
  742                     if (amv_file_format) {
 
  752                     if (tag1 == 
MKTAG(
'D', 
'X', 
'S', 
'B') ||
 
  753                         tag1 == 
MKTAG(
'D', 
'X', 
'S', 
'A')) {
 
  760                     if (size > 10 * 4 && size < (1 << 30) && 
size < avi->fsize) {
 
  761                         if (esize == size-1 && (esize&1)) {
 
  789                         for (i = 0; i < pal_size / 4; i++)
 
  790                             ast->
pal[i] = 0xFFU<<24 | 
AV_RL32(pal_src+4*i);
 
  808                                   "mov tag found in avi (fourcc %s)\n",
 
  816                         ast->
handler == MKTAG(
'X', 
'V', 
'I', 
'D'))
 
  849                                "sample size (%d) != block align (%d)\n",
 
  877                     if (amv_file_format) {
 
  908         case MKTAG(
's', 
't', 
'r', 
'd'):
 
  915                 if (cur_pos < list_end)
 
  916                     size = 
FFMIN(size, list_end - cur_pos);
 
  933         case MKTAG(
'i', 
'n', 
'd', 
'x'):
 
  942         case MKTAG(
'v', 
'p', 
'r', 
'p'):
 
  943             if (stream_index < (
unsigned)s->
nb_streams && size > 9 * 4) {
 
  959                 if (active_aspect.
num && active_aspect.
den &&
 
  960                     active.
num && active.
den) {
 
  963                             active_aspect.
num, active_aspect.
den,
 
  970         case MKTAG(
's', 
't', 
'r', 
'n'):
 
  978             if (size > 1000000) {
 
  980                        "Something went wrong during header parsing, " 
  981                        "I will ignore it and try to continue anyway.\n");
 
 1014     if (dict_entry && !strcmp(dict_entry->
value, 
"PotEncoder"))
 
 1033                "Non-interleaved AVI without index, switching to interleaved\n");
 
 1050     if (pkt->
size >= 7 &&
 
 1103         memset(pkt, 0, 
sizeof(*pkt));
 
 1117     int64_t ts, next_ts, ts_min = INT64_MAX;
 
 1129             if (ts <= next_ts && ts < ts_min) {
 
 1149     if (d[0] >= 
'0' && d[0] <= 
'9' &&
 
 1150         d[1] >= 
'0' && d[1] <= 
'9') {
 
 1151         return (d[0] - 
'0') * 10 + (d[1] - 
'0');
 
 1171     memset(d, -1, 
sizeof(d));
 
 1175         for (j = 0; j < 7; j++)
 
 1179         size = d[4] + (d[5] << 8) + (d[6] << 16) + (d[7] << 24);
 
 1182         ff_tlog(s, 
"%X %X %X %X %X %X %X %X %"PRId64
" %u %d\n",
 
 1183                 d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
 
 1184         if (i*(avi->
io_fsize>0) + (uint64_t)size > avi->
fsize || d[0] > 127)
 
 1188         if ((d[0] == 
'i' && d[1] == 
'x' && n < s->
nb_streams) ||
 
 1190             (d[0] == 
'J' && d[1] == 
'U' && d[2] == 
'N' && d[3] == 
'K') ||
 
 1191             (d[0] == 
'i' && d[1] == 
'd' && d[2] == 
'x' && d[3] == 
'1')) {
 
 1197         if (d[0] == 
'L' && d[1] == 
'I' && d[2] == 
'S' && d[3] == 
'T') {
 
 1209         if (d[2] == 
'i' && d[3] == 
'x' && n < s->nb_streams) {
 
 1218         if (n < s->nb_streams) {
 
 1233                 if (   d[2] == 
'w' && d[3] == 
'b' 
 1237                    && ast->
prefix == 
'd'*256+
'c' 
 1244                            "Invalid stream + prefix combination, assuming audio.\n");
 
 1261             if (d[2] == 
'p' && d[3] == 
'c' && size <= 4 * 256 + 4) {
 
 1263                 int last = (k + 
avio_r8(pb) - 1) & 0xFF;
 
 1268                 for (; k <= last; k++)
 
 1274                         d[2] < 128 && d[3] < 128) ||
 
 1275                        d[2] * 256 + d[3] == ast->
prefix  
 1280                 if (d[2] * 256 + d[3] == ast->
prefix)
 
 1283                     ast->
prefix       = d[2] * 256 + d[3];
 
 1312     int best_stream_index = 0;
 
 1315     int64_t best_ts = INT64_MAX;
 
 1336                 st->time_base.num, st->time_base.den, ast->frame_offset);
 
 1340             best_stream_index = i;
 
 1346     best_ast = best_st->priv_data;
 
 1347     best_ts  = best_ast->frame_offset;
 
 1348     if (best_ast->remaining) {
 
 1356             best_ast->frame_offset = best_st->index_entries[i].timestamp;
 
 1360         int64_t pos = best_st->index_entries[i].pos;
 
 1361         pos += best_ast->packet_size - best_ast->remaining;
 
 1365         av_assert0(best_ast->remaining <= best_ast->packet_size);
 
 1367         avi->stream_index = best_stream_index;
 
 1368         if (!best_ast->remaining)
 
 1369             best_ast->packet_size =
 
 1370             best_ast->remaining   = best_st->index_entries[i].size;
 
 1384     if (CONFIG_DV_DEMUXER && avi->
dv_demux) {
 
 1424         if (ast->
has_pal && pkt->
size < (
unsigned)INT_MAX / 2) {
 
 1431                        "Failed to allocate data for palette\n");
 
 1438         if (CONFIG_DV_DEMUXER && avi->
dv_demux) {
 
 1459                     "dts:%"PRId64
" offset:%"PRId64
" %d/%d smpl_siz:%d " 
 1460                     "base:%d st:%d size:%d\n",
 
 1486                                 if (state == 0x1B6 && ptr < 
end) {
 
 1487                                     key = !(*ptr & 0xC0);
 
 1539     int nb_index_entries, i;
 
 1544     int64_t last_pos = -1;
 
 1545     unsigned last_idx = -1;
 
 1546     int64_t idx1_pos, first_packet_pos = 0, data_offset = 0;
 
 1549     nb_index_entries = size / 16;
 
 1550     if (nb_index_entries <= 0)
 
 1561         first_packet_pos = 0;
 
 1566     for (i = 0; i < nb_index_entries; i++) {
 
 1575                 i, tag, flags, pos, len);
 
 1577         index  = ((tag      & 0xff) - 
'0') * 10;
 
 1578         index +=  (tag >> 8 & 0xff) - 
'0';
 
 1584         if (first_packet && first_packet_pos) {
 
 1585             if (avi->
movi_list + 4 != pos || pos + 500 > first_packet_pos)
 
 1586                 data_offset  = first_packet_pos - pos;
 
 1595         if (last_pos == pos)
 
 1597         if (last_idx != pos && len) {
 
 1607         for (index = 0; index < s->
nb_streams; index++) {
 
 1620     int64_t min_pos, pos;
 
 1625     for (min_pos = pos = 0; min_pos != INT64_MAX; pos = min_pos + 1LU) {
 
 1626         int64_t max_dts = INT64_MIN / 2;
 
 1627         int64_t min_dts = INT64_MAX / 2;
 
 1628         int64_t max_buffer = 0;
 
 1630         min_pos = INT64_MAX;
 
 1643                 min_dts = 
FFMIN(min_dts, dts);
 
 1651             if (idx[i] && min_dts != INT64_MAX / 2) {
 
 1656                 max_dts = 
FFMAX(max_dts, dts);
 
 1657                 max_buffer = 
FFMAX(max_buffer,
 
 1664             max_buffer > 1024 * 1024 * 8 * 8) {
 
 1676     int64_t last_start = 0;
 
 1677     int64_t first_end  = INT64_MAX;
 
 1697                 last_start = INT64_MAX;
 
 1707     if (last_start > first_end)
 
 1730         next = 
avio_tell(pb) + size + (size & 1);
 
 1739         if (tag == 
MKTAG(
'i', 
'd', 
'x', 
'1') &&
 
 1743         }
else if (tag == 
MKTAG(
'L', 
'I', 
'S', 
'T')) {
 
 1746             if (tag1 == 
MKTAG(
'I', 
'N', 
'F', 
'O'))
 
 1771                          int64_t timestamp, 
int flags)
 
 1776     int64_t pos, pos_min;
 
 1792     st    = s->
streams[stream_index];
 
 1799             av_log(s, 
AV_LOG_DEBUG, 
"Failed to find timestamp %"PRId64 
" in index %"PRId64 
" .. %"PRId64 
"\n",
 
 1813     if (CONFIG_DV_DEMUXER && avi->
dv_demux) {
 
 1928     .extensions     = 
"avi",
 
 1934     .priv_class = &demuxer_class,
 
int ff_read_riff_info(AVFormatContext *s, int64_t size)
 
static AVStream * get_subtitle_pkt(AVFormatContext *s, AVStream *next_st, AVPacket *pkt)
 
#define AVERROR_INVALIDDATA
Invalid data found when processing input. 
 
int64_t avio_size(AVIOContext *s)
Get the filesize. 
 
ptrdiff_t const GLvoid * data
 
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list. 
 
AVFormatContext * sub_ctx
 
#define AV_LOG_WARNING
Something somehow does not look correct. 
 
int64_t bit_rate
the average bitrate 
 
#define LIBAVUTIL_VERSION_INT
 
unsigned char * buf_ptr
Current position in the buffer. 
 
unsigned char * buf_end
End of the data, may be less than buffer+buffer_size if the read function returned less data than req...
 
int64_t pos
byte position in stream, -1 if unknown 
 
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
 
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) 
 
int index
stream index in AVFormatContext 
 
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext. 
 
AVIndexEntry * index_entries
Only used if the format does not support seeking natively. 
 
enum AVMediaType codec_type
 
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
 
static int get_duration(AVIStream *ast, int len)
 
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward. 
 
size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
Put a string representing the codec tag codec_tag in buf. 
 
static int ni_prepare_read(AVFormatContext *s)
 
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
 
int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen)
Read a UTF-16 string from pb and convert it to UTF-8. 
 
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
 
static int check_stream_max_drift(AVFormatContext *s)
 
static const AVMetadataConv avi_metadata_conv[]
 
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
 
#define av_assert0(cond)
assert() equivalent, that is always enabled. 
 
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature. 
 
Opaque data information usually continuous. 
 
static int avi_read_close(AVFormatContext *s)
 
const AVCodecTag ff_codec_movvideo_tags[]
 
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development. 
 
unsigned int avio_rb32(AVIOContext *s)
 
static av_cold int end(AVCodecContext *avctx)
 
enum AVStreamParseType need_parsing
 
int id
Format-specific stream ID. 
 
uint8_t * extradata
some codecs need / can use extradata like Huffman tables. 
 
static void handler(vbi_event *ev, void *user_data)
 
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file. 
 
AVStream ** streams
A list of all streams in the file. 
 
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext. 
 
static void clean_index(AVFormatContext *s)
 
static double av_q2d(AVRational a)
Convert rational to double. 
 
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key. 
 
int flags
Flags modifying the (de)muxer behaviour. 
 
static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt)
 
#define AVERROR_EOF
End of file. 
 
static av_cold int read_close(AVFormatContext *ctx)
 
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext. 
 
static const uint8_t header[24]
 
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv). 
 
const uint8_t * avpriv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state)
 
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf. 
 
#define AV_PKT_FLAG_KEY
The packet contains a keyframe. 
 
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers. 
 
#define AVIF_MUSTUSEINDEX
 
AVIOContext * avio_alloc_context(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int(*read_packet)(void *opaque, uint8_t *buf, int buf_size), int(*write_packet)(void *opaque, uint8_t *buf, int buf_size), int64_t(*seek)(void *opaque, int64_t offset, int whence))
Allocate and initialize an AVIOContext for buffered I/O. 
 
int ff_get_bmp_header(AVIOContext *pb, AVStream *st, unsigned *esize)
Read BITMAPINFOHEADER structure and set AVStream codec width, height and bits_per_encoded_sample fiel...
 
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered. 
 
AVDictionary * metadata
Metadata that applies to the whole file. 
 
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp. 
 
unsigned int avio_rl32(AVIOContext *s)
 
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
 
int64_t timestamp
Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are...
 
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
 
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another. 
 
static int read_braindead_odml_indx(AVFormatContext *s, int frame_num)
 
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers. 
 
preferred ID for decoding MPEG audio layer 1, 2 or 3 
 
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored. 
 
static int avi_read_tag(AVFormatContext *s, AVStream *st, uint32_t tag, uint32_t size)
 
simple assert() macros that are a bit more flexible than ISO C assert(). 
 
static int get_stream_idx(const unsigned *d)
 
static const uint8_t offset[127][2]
 
AVRational avg_frame_rate
Average framerate. 
 
AVInputFormat * av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max)
Guess the file format. 
 
int flags
A combination of AV_PKT_FLAG values. 
 
int avio_r8(AVIOContext *s)
 
AVCodecContext * codec
Codec context associated with this stream. 
 
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. 
 
common internal API header 
 
unsigned int nb_streams
Number of elements in AVFormatContext.streams. 
 
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable. 
 
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest. 
 
#define AV_TIME_BASE
Internal time base represented as integer. 
 
const AVCodecTag ff_codec_bmp_tags[]
 
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare. 
 
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
 
int width
picture width / height. 
 
static int avi_read_header(AVFormatContext *s)
 
GLsizei GLboolean const GLfloat * value
 
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
 
static const char months[12][4]
 
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
 
static void seek_subtitle(AVStream *st, AVStream *st2, int64_t timestamp)
 
#define AV_EF_EXPLODE
abort decoding on minor error detection 
 
Usually treated as AVMEDIA_TYPE_DATA. 
 
preferred ID for MPEG-1/2 video decoding 
 
static int calculate_bitrate(AVFormatContext *s)
 
static int read_header(FFV1Context *f)
 
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
 
static const char avi_headers[][8]
 
static av_always_inline int bytestream2_tell(GetByteContext *g)
 
static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
 
#define AV_LOG_INFO
Standard information. 
 
enum AVMediaType codec_type
 
#define AV_TIME_BASE_Q
Internal time base represented as fractional value. 
 
AVIOContext * pb
I/O context. 
 
void av_packet_unref(AVPacket *pkt)
Wipe the packet. 
 
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). 
 
int avpriv_exif_decode_ifd(AVCodecContext *avctx, GetByteContext *gbytes, int le, int depth, AVDictionary **metadata)
Recursively decodes all IFD's and adds included TAGS into the metadata dictionary. 
 
double(* duration_error)[2][MAX_STD_TIMEBASES]
 
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry. 
 
static const AVOption options[]
 
Describe the class of an AVClass context structure. 
 
static int avi_read_idx1(AVFormatContext *s, int size)
 
rational number numerator/denominator 
 
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding 
 
discard useless packets like 0 size packets in avi 
 
static int avi_probe(AVProbeData *p)
 
int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec, int size, int big_endian)
 
int error
contains the error code or 0 if no error happened 
 
This structure contains the data a format has to probe a file. 
 
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Seek to timestamp ts. 
 
const AVMetadataConv ff_riff_info_conv[]
 
static int avi_extract_stream_metadata(AVStream *st)
 
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational. 
 
static int avi_load_index(AVFormatContext *s)
 
AVInputFormat ff_avi_demuxer
 
int64_t duration
Decoding: duration of the stream, in stream time base. 
 
A reference to a data buffer. 
 
static const AVClass demuxer_class
 
unsigned int avio_rl16(AVIOContext *s)
 
static void avi_read_nikon(AVFormatContext *s, uint64_t end)
 
struct AVStream::@158 * info
 
static void avi_metadata_creation_time(AVDictionary **metadata, char *date)
 
common internal api header. 
 
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
 
int av_reallocp(void *ptr, size_t size)
Allocate or reallocate a block of memory. 
 
int error_recognition
Error recognition; higher values will detect more errors but may misdetect some more or less valid pa...
 
static int get_riff(AVFormatContext *s, AVIOContext *pb)
 
int64_t nb_frames
number of frames in this stream if known or 0 
 
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext. 
 
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
 
static int guess_ni_flag(AVFormatContext *s)
 
void * priv_data
Format private data. 
 
#define print_tag(str, tag, size)
 
int avformat_open_input(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header. 
 
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
 
static void * av_mallocz_array(size_t nmemb, size_t size)
 
static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds. 
 
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext. 
 
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet. 
 
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
 
#define MKTAG(a, b, c, d)
 
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed. 
 
int request_probe
stream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with re...
 
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
 
This structure stores compressed data. 
 
uint64_t avio_rl64(AVIOContext *s)
 
static int avi_sync(AVFormatContext *s, int exit_early)
 
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
 
DVDemuxContext * dv_demux