30 typedef struct yop_dec_context {
42 probe_packet->
buf[6] &&
43 probe_packet->
buf[7] &&
44 !(probe_packet->
buf[8] & 1) &&
45 !(probe_packet->
buf[10] & 1))
57 AVStream *audio_stream, *video_stream;
73 audio_dec = audio_stream->
codec;
81 video_dec = video_stream->
codec;
121 int actual_video_data_size = yop->
frame_size -
130 #if FF_API_DESTRUCT_PACKET 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.
void av_free_packet(AVPacket *pkt)
Free a packet.
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)
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.
int64_t data_offset
offset of the first packet
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
attribute_deprecated void(* destruct)(struct AVPacket *)
#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.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#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.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
void av_log(void *avcl, int level, const char *fmt,...)
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
audio channel layout utility functions
int width
picture width / height.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
main external API structure.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
rational number numerator/denominator
This structure contains the data a format has to probe a file.
unsigned int avio_rl16(AVIOContext *s)
#define FF_DISABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
int channels
number of audio channels
void * priv_data
Format private data.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...