50 unsigned header_size, comment_size;
81 if (sample_rate <= 0 || sample_rate > INT_MAX) {
89 "truncating fractional part of sample rate (%f)\n",
92 if ((header_size + 4) & 7 || header_size <
SOX_FIXED_HDR + comment_size
98 if (comment_size && comment_size < UINT_MAX) {
uint64_t avio_rb64(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)
uint64_t avio_rl64(AVIOContext *s)
static int FUNC() comment(CodedBitstreamContext *ctx, RWContext *rw, JPEGRawComment *current)
static __device__ float floor(float a)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#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_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_always_inline double av_int2double(uint64_t i)
Reinterpret a 64-bit integer as a double.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define SOX_FIXED_HDR
Size of fixed header without magic.
AVInputFormat ff_sox_demuxer
static int sox_read_header(AVFormatContext *s)
static int sox_probe(const AVProbeData *p)
int bits_per_coded_sample
The number of bits per sample in the codedwords.
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
Audio only.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
Audio only.
This structure contains the data a format has to probe a file.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVCodecParameters * codecpar
Codec parameters associated with this stream.