37 if (ret < (
int)
sizeof(*g)) {
38 memset(*g, 0,
sizeof(*g));
72 if (!memcmp(subformat + 4,
74 !memcmp(subformat + 4,
76 !memcmp(subformat + 4,
134 if (size >= 18 &&
id != 0x0165) {
141 cbSize =
FFMIN(size, cbSize);
142 if (cbSize >= 22 &&
id == 0xfffe) {
157 }
else if (
id == 0x0165 && size >= 32) {
168 if (size < 8 + nb_streams * 20)
248 if (chunk_code || chunk_size) {
254 if (chunk_size > end ||
255 end - chunk_size < cur ||
256 chunk_size == UINT_MAX) {
260 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
266 chunk_size += (chunk_size & 1);
281 "out of memory, unable to read INFO tag\n");
290 if (
avio_read(pb, value, chunk_size) != chunk_size) {
292 "premature end of file while reading INFO tag\n");
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
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.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
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
This struct describes the properties of an encoded stream.
const AVCodecGuid ff_codec_wav_guids[]
int ff_get_bmp_header(AVIOContext *pb, AVStream *st, uint32_t *size)
Read BITMAPINFOHEADER structure and set AVStream codec width, height and bits_per_encoded_sample fiel...
#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)
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
uint64_t channel_layout
Audio only.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
static void parse_waveformatex(AVIOContext *pb, AVCodecParameters *par)
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)
enum AVMediaType codec_type
General type of the encoded data.
const AVCodecTag ff_codec_wav_tags[]
int block_align
Audio only.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
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.
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.
#define FF_BROKEN_BASE_GUID
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int sample_rate
Audio only.
int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int size, int big_endian)
unsigned int avio_rl16(AVIOContext *s)
int eof_reached
true if eof reached
int bits_per_coded_sample
The number of bits per sample in the codedwords.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
int ff_get_guid(AVIOContext *s, ff_asf_guid *g)
int ff_read_riff_info(AVFormatContext *s, int64_t size)
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32