22 #include "libavutil/channel_layout.h"
27 #define MAGIC "Packed Animation File V1.0\n(c) 1992-96 Amazing Studio\x0a\x1a"
28 #define PAF_SOUND_SAMPLES 2205
29 #define PAF_SOUND_FRAME_SIZE ((256 + PAF_SOUND_SAMPLES) * 2)
84 for (i = 0; i < count; i++)
146 p->
nb_frames > INT_MAX /
sizeof(uint32_t) ||
198 uint32_t count, offset;
218 for (i = 0; i < count; i++) {
252 if (pkt->
data[0] & 0x20)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int read_probe(AVProbeData *p)
uint32_t * blocks_offset_table
AVCodecContext * codec
Codec context associated with this stream.
#define AV_CH_LAYOUT_STEREO
static int read_header(AVFormatContext *s)
uint32_t current_frame_block
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
uint32_t current_frame_count
static int read_close(AVFormatContext *s)
uint32_t * frames_offset_table
#define PAF_SOUND_SAMPLES
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVInputFormat ff_paf_demuxer
#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_PKT_FLAG_KEY
The packet contains a keyframe.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
static int read_packet(AVFormatContext *s, AVPacket *pkt)
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
int buf_size
Size of buf except extra allocated bytes.
int width
picture width / height.
uint8_t * temp_audio_frame
enum AVMediaType codec_type
int sample_rate
samples per second
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
int64_t duration
Decoding: duration of the stream, in stream time base.
int64_t start_time
Decoding: pts of the first frame of the stream, in stream time base.
int64_t nb_frames
number of frames in this stream if known or 0
int eof_reached
true if eof reached
int channels
number of audio channels
#define PAF_SOUND_FRAME_SIZE
uint32_t * blocks_count_table
static void read_table(AVFormatContext *s, uint32_t *table, uint32_t count)
This structure stores compressed data.
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 ...