29 #include "libavutil/channel_layout.h"
30 #include "libavutil/intreadwrite.h"
57 int fps, chunk_header;
104 avio_seek(pb, chunk_header - 3, SEEK_SET);
114 int ret, audio_offset, video_offset, chunk_size, audio_size = 0;
122 while(state !=
MKTAG(
'S',
'A',
'V',
'I')){
125 state = 256*state +
avio_r8(pb);
133 audio_size = video_offset - audio_offset;
135 if (audio_size < 0 || bfi->video_size < 0) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#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. ...
uint64_t channel_layout
Audio channel layout.
int bit_rate
the average bitrate
int width
picture width / height.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static int read_header(FFV1Context *f)
8 bit with PIX_FMT_RGB32 palette
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
This structure contains the data a format has to probe a file.
#define MKTAG(a, b, c, d)
int eof_reached
true if eof reached
int channels
number of audio channels
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...