30 typedef struct yop_dec_context {
42 probe_packet->
buf[2]<10 &&
43 probe_packet->
buf[3]<10 &&
44 probe_packet->
buf[6] &&
45 probe_packet->
buf[7] &&
46 !(probe_packet->
buf[8] & 1) &&
47 !(probe_packet->
buf[10] & 1) &&
49 AV_RL16(probe_packet->
buf + 12 + 6) < probe_packet->
buf[12] * 3 + 4 + probe_packet->
buf[7] * 2048
68 if (!audio_stream || !video_stream)
126 int actual_video_data_size = yop->
frame_size -
151 }
else if (ret < yop->palette_size) {
166 actual_video_data_size);
169 else if (ret < actual_video_data_size)
188 int64_t timestamp,
int flags)
191 int64_t frame_pos, pos_min, pos_max;
199 frame_count = (pos_max - pos_min) / yop->
frame_size;
201 timestamp =
FFMAX(0,
FFMIN(frame_count, timestamp));
203 frame_pos = timestamp * yop->
frame_size + pos_min;
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int64_t avio_size(AVIOContext *s)
Get the filesize.
int64_t pos
byte position in stream, -1 if unknown
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
static AVStream * video_stream
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
This struct describes the properties of an encoded stream.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
uint64_t channel_layout
Audio only.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#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.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static AVStream * audio_stream
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
int flags
A combination of AV_PKT_FLAG values.
int avio_r8(AVIOContext *s)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
audio channel layout utility functions
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
AVIOContext * pb
I/O context.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Rational number (pair of numerator and denominator).
This structure contains the data a format has to probe a file.
int sample_rate
Audio only.
unsigned int avio_rl16(AVIOContext *s)
void * priv_data
Format private data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.