50 if ((br->
pos & 7) == 0)
56 return !!(br->
last & 0x80000000);
63 for (
int i = 0;
i < n;
i++) {
64 int ret =
pop(br, pb);
80 while ((ret =
pop(br, pb)) == 0)
101 if (!(
data & 0x80)) {
109 if (!(
data & 0x80)) {
128 if (bytestream2_get_be16(&gb) != 0x4C32)
133 if (bytestream2_get_be16(&gb) == 0)
138 int type = bytestream2_get_byte(&gb);
139 int size = bytestream2_get_byte(&gb);
142 score += 5 * (
size == 0);
175 int stream_index = -1;
226 if (stream_index ==
s->nb_streams) {
285 int stream_index,
bits, pkt_size, endframe;
297 if (stream_index < 0)
299 if (stream_index >=
s->nb_streams)
302 endframe =
pop(br, pb);
317 pkt_size =
pop_int(br, pb, 13) + 1;
318 if (pkt_size > m->
size)
320 packet =
s->streams[stream_index]->priv_data;
329 if (endframe && packet->
size > 0) {
332 pkt->stream_index = stream_index;
335 if (
pkt->data[0] & 0x80)
346 if (m->
flags % 2 == 0) {
368 for (
int i = 0;
i <
s->nb_streams;
i++) {
378 .p.extensions =
"moflex",
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
uint64_t avio_rb64(AVIOContext *s)
unsigned int avio_rb16(AVIOContext *s)
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.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rb24(AVIOContext *s)
int avio_r8(AVIOContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
static int read_probe(const AVProbeData *p)
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
static const uint8_t bits[8]
static int read_header(FFV1Context *f, RangeCoder *c)
@ AV_CODEC_ID_ADPCM_IMA_MOFLEX
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#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.
static AVRational av_make_q(int num, int den)
Create an AVRational.
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
#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 moflex_read_sync(AVFormatContext *s)
static int pop_int(BitReader *br, AVIOContext *pb, int n)
static int pop(BitReader *br, AVIOContext *pb)
static int read_var_byte(AVFormatContext *s, unsigned *out)
static int moflex_probe(const AVProbeData *p)
static int moflex_read_close(AVFormatContext *s)
static int moflex_read_packet(AVFormatContext *s, AVPacket *pkt)
static int pop_length(BitReader *br, AVIOContext *pb)
static int moflex_read_header(AVFormatContext *s)
static int moflex_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
enum AVMediaType codec_type
int nb_channels
Number of channels in this layout.
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.
This structure contains the data a format has to probe a file.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.