35 if (
avio_read(s, *g,
sizeof(*g)) < (
int)
sizeof(*g)) {
36 memset(*g, 0,
sizeof(*g));
69 if (!memcmp(subformat + 4,
128 cbSize =
FFMIN(size, cbSize);
129 if (cbSize >= 22 &&
id == 0xfffe) {
216 if (chunk_code || chunk_size) {
222 if (chunk_size > end ||
223 end - chunk_size < cur ||
224 chunk_size == UINT_MAX) {
228 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
234 chunk_size += (chunk_size & 1);
249 "out of memory, unable to read INFO tag\n");
255 if (
avio_read(pb, value, chunk_size) != chunk_size) {
257 "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 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.
unsigned int avio_rb16(AVIOContext *s)
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 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.
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size, int big_endian)
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[]
Libavcodec external API header.
uint64_t channel_layout
Audio channel layout.
AVCodecContext * codec
Codec context associated with this stream.
int bit_rate
the average bitrate
#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.
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 ...