79 if (
s->pb->eof_reached)
95 int audio_size =
c->packet[1] * 65 + 1;
96 if (audio_size >=
c->size) {
103 memcpy(
pkt->data,
c->packet + 1,
pkt->size);
104 pkt->stream_index = 1;
105 pkt->pts =
c->audio_pos;
106 pkt->duration =
c->packet[1] * 32;
107 c->audio_pos +=
pkt->duration;
115 pkt->stream_index = 0;
117 memcpy(
pkt->data,
c->packet,
pkt->size);
133 .p.extensions =
"bmv",
unsigned int avio_rl24(AVIOContext *s)
int avio_r8(AVIOContext *s)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int bmv_read_header(AVFormatContext *s)
static int bmv_read_close(AVFormatContext *s)
static int bmv_read_packet(AVFormatContext *s, AVPacket *pkt)
Public libavutil channel layout APIs header.
static int read_header(FFV1Context *f, RangeCoder *c)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AV_CHANNEL_LAYOUT_STEREO
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_reallocp(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory through a pointer to a pointer.
#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)
Memory handling functions.
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
An AVChannelLayout holds information about the channel layout of audio data.
int height
The height of the video frame in pixels.
AVChannelLayout ch_layout
The channel layout and number of channels.
int width
The width of the video frame in pixels.
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
The number of audio samples per second.
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.