39 memset(*
g, 0,
sizeof(*
g));
76 if (!memcmp(subformat + 4,
78 !memcmp(subformat + 4,
80 !memcmp(subformat + 4,
186 if (
size >= 18 &&
id != 0x0165) {
194 if (cbSize >= 22 &&
id == 0xfffe) {
198 }
else if (cbSize >= 12 &&
id == 0x1610) {
200 if (wPayloadType == 3)
223 }
else if (
id == 0x0165 &&
size >= 32) {
266 if (expected_bitrate && par->
bit_rate / 8 != expected_bitrate / 8) {
268 "nAvgBytesPerSec %"PRId64
" inconsistent with other fields"
269 " (expected %"PRId64
"), overriding.\n",
270 par->
bit_rate / 8, expected_bitrate / 8);
331 if (chunk_code || chunk_size) {
337 if (chunk_size > end ||
338 end - chunk_size < cur ||
339 chunk_size == UINT_MAX) {
343 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
349 chunk_size += (chunk_size & 1);
364 "out of memory, unable to read INFO tag\n");
375 "premature end of file while reading INFO tag\n");
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
unsigned int avio_rb16(AVIOContext *s)
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
unsigned int avio_rl16(AVIOContext *s)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl32(AVIOContext *s)
unsigned int avio_rb32(AVIOContext *s)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define i(width, name, range_min, range_max)
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end which is always set to 0 and f...
static unsigned int nb_streams
static const uint8_t frame_size[4]
AVCodecID
Identify the syntax and semantics of the bitstream.
@ AV_CODEC_ID_ADPCM_IMA_WAV
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask)
Initialize a native channel layout from a bitmask indicating which channels are present.
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
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 AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static const uint16_t mask[17]
Memory handling functions.
const AVCodecGuid ff_codec_wav_guids[]
const AVCodecTag ff_codec_wav_tags[]
internal header for RIFF based (de)muxers do NOT include this in end user applications
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
#define FF_BROKEN_BASE_GUID
#define FF_MEDIASUBTYPE_BASE_GUID
#define FF_AMBISONIC_BASE_GUID
int ff_get_guid(AVIOContext *s, ff_asf_guid *g)
static void parse_waveformatex(void *logctx, AVIOContext *pb, AVCodecParameters *par)
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...
int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int size, int big_endian)
enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
static int64_t compute_bitrate(const AVCodecParameters *par)
int ff_read_riff_info(AVFormatContext *s, int64_t size)
enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
enum AVChannelOrder order
Channel order used in this layout.
int nb_channels
Number of channels in this layout.
This struct describes the properties of an encoded stream.
int height
The height of the video frame in pixels.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
int width
The width of the video frame in pixels.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
enum AVMediaType codec_type
General type of the encoded data.
int block_align
The number of bytes per coded audio frame, required by some formats.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
int eof_reached
true if was unable to read due to error or eof
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define avpriv_request_sample(...)