26 #include "libavutil/intreadwrite.h"
31 #define BLOCK_SAMPLES 32
51 return ret < 0 ? ret :
AVERROR(EIO);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void av_free_packet(AVPacket *pkt)
Free a packet.
int64_t pos
byte position in stream, -1 if unknown
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
#define AVERROR_EOF
End of file.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
struct AVInputFormat * iformat
The input container format.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
AVStream ** streams
A list of all streams in the file.
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
main external API structure.
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
int channels
number of audio channels
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...