97 for (
i = 0;
i < index_cnt;
i++) {
105 if (size < 9 + 4*pmp->num_streams) {
157 for (
i = 0;
i < num_packets;
i++)
static int64_t fsize(FILE *f)
int64_t avio_size(AVIOContext *s)
Get the filesize.
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.
unsigned int avio_rl32(AVIOContext *s)
int avio_r8(AVIOContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define flags(name, subs,...)
static int read_header(FFV1Context *f)
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_cold int read_close(AVFormatContext *ctx)
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static int pmp_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
AVInputFormat ff_pmp_demuxer
static int pmp_probe(const AVProbeData *p)
static int pmp_close(AVFormatContext *s)
static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
static int pmp_header(AVFormatContext *s)
enum AVMediaType codec_type
General type of the encoded data.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
Audio only.
This structure stores compressed data.
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.
int64_t nb_frames
number of frames in this stream if known or 0
int64_t duration
Decoding: duration of the stream, in stream time base.