37 if (ret < (
int)
sizeof(*g)) {
38 memset(*g, 0,
sizeof(*g));
71 if (!memcmp(subformat + 4,
73 !memcmp(subformat + 4,
131 if (size >= 18 &&
id != 0x0165) {
138 cbSize =
FFMIN(size, cbSize);
139 if (cbSize >= 22 &&
id == 0xfffe) {
154 }
else if (
id == 0x0165 && size >= 32) {
165 if (size < 8 + nb_streams * 20)
244 if (chunk_code || chunk_size) {
250 if (chunk_size > end ||
251 end - chunk_size < cur ||
252 chunk_size == UINT_MAX) {
256 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
262 chunk_size += (chunk_size & 1);
277 "out of memory, unable to read INFO tag\n");
286 if (
avio_read(pb, value, chunk_size) != chunk_size) {
288 "premature end of file while reading INFO tag\n");
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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_WARNING
Something somehow does not look correct.
int64_t bit_rate
the average bitrate
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec, int size, int big_endian)
unsigned int avio_rb16(AVIOContext *s)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
const AVCodecGuid ff_codec_wav_guids[]
#define FF_AMBISONIC_BASE_GUID
#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.
#define FF_MEDIASUBTYPE_BASE_GUID
unsigned int avio_rb32(AVIOContext *s)
static av_cold int end(AVCodecContext *avctx)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static void parse_waveformatex(AVIOContext *pb, AVCodecContext *c)
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
unsigned int avio_rl32(AVIOContext *s)
enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
const AVCodecTag ff_codec_wav_tags[]
uint64_t channel_layout
Audio channel layout.
AVCodecContext * codec
Codec context associated with this stream.
#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.
GLsizei GLboolean const GLfloat * value
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Libavcodec external API header.
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
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 avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
unsigned int avio_rl16(AVIOContext *s)
int eof_reached
true if eof reached
int channels
number of audio channels
int ff_get_guid(AVIOContext *s, ff_asf_guid *g)
int ff_read_riff_info(AVFormatContext *s, int64_t size)
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...