22 #include "libavutil/dict.h"
23 #include "libavutil/error.h"
24 #include "libavutil/log.h"
25 #include "libavutil/mathematics.h"
26 #include "libavcodec/avcodec.h"
33 {
AV_CODEC_ID_AC3, { 0x2C, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
34 {
AV_CODEC_ID_ATRAC3P, { 0xBF, 0xAA, 0x23, 0xE9, 0x58, 0xCB, 0x71, 0x44, 0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62 } },
35 {
AV_CODEC_ID_EAC3, { 0xAF, 0x87, 0xFB, 0xA7, 0x02, 0x2D, 0xFB, 0x42, 0xA4, 0xD4, 0x05, 0xCD, 0x93, 0x84, 0x3B, 0xDD } },
36 {
AV_CODEC_ID_MP2, { 0x2B, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
43 if (
avio_read(s, *g,
sizeof(*g)) < (
int)
sizeof(*g))
44 memset(*g, 0,
sizeof(*g));
74 if (!memcmp(subformat + 4,
112 cbSize =
FFMIN(size, cbSize);
113 if (cbSize >= 22 &&
id == 0xfffe) {
201 if (chunk_code || chunk_size) {
207 if (chunk_size > end ||
208 end - chunk_size < cur ||
209 chunk_size == UINT_MAX) {
213 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
219 chunk_size += (chunk_size & 1);
234 "out of memory, unable to read INFO tag\n");
240 if (
avio_read(pb, value, chunk_size) != chunk_size) {
242 "premature end of file while reading INFO tag\n");
int ff_read_riff_info(AVFormatContext *s, int64_t size)
#define AV_LOG_WARNING
Something somehow does not look correct.
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define FF_MEDIASUBTYPE_BASE_GUID
static av_cold int end(AVCodecContext *avctx)
static void parse_waveformatex(AVIOContext *pb, AVCodecContext *c)
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVCodecID
Identify the syntax and semantics of the bitstream.
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.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
const AVCodecTag ff_codec_wav_tags[]
uint64_t channel_layout
Audio channel layout.
int bit_rate
the average bitrate
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() and chilren.
int width
picture width / height.
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
const AVCodecGuid ff_codec_wav_guids[]
enum AVMediaType codec_type
int sample_rate
samples per second
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
AVIOContext * pb
I/O context.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
#define AVERROR_INVALIDDATA
int eof_reached
true if eof reached
int channels
number of audio channels
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...