62 #define GIF_DEFAULT_DELAY 10
66 #define GIF_MIN_DELAY 2
84 for (i = 0; i < 6; i++) {
101 if ((ret =
resync(pb)) < 0)
108 if (width == 0 || height == 0)
132 int sb_size,
ret = 0;
134 while (0x00 != (sb_size =
avio_r8(pb))) {
146 int sb_size, ext_label =
avio_r8(pb);
150 if ((sb_size =
avio_r8(pb)) < 4) {
166 if ((ret =
avio_skip(pb, sb_size - 3)) < 0 )
173 if (ret < 0 || !sb_size)
179 if (ret < 0 || !sb_size)
182 if (sb_size == 3 && data[0] == 1) {
201 int packed_fields, block_label, ct_size,
202 keyframe, frame_parsed = 0,
ret;
204 unsigned char buf[6];
209 }
else if (
ret < 0) {
228 if (packed_fields & 0x80) {
229 ct_size = 3 * (1 << ((packed_fields & 0x07) + 1));
251 if (packed_fields & 0x80) {
252 ct_size = 3 * (1 << ((packed_fields & 0x07) + 1));
269 if (
avio_seek(pb, frame_start, SEEK_SET) != frame_start)
336 .priv_class = &demuxer_class,
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
ptrdiff_t const GLvoid * data
#define LIBAVUTIL_VERSION_INT
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
static const uint8_t gif87a_sig[6]
#define GIF_GCE_EXT_LABEL
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
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_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
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.
#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. ...
int flags
A combination of AV_PKT_FLAG values.
int avio_r8(AVIOContext *s)
static void frame_end(MpegEncContext *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 GIF_IMAGE_SEPARATOR
int min_delay
Minimum allowed delay between frames in hundredths of second.
int width
picture width / height.
#define GIF_APP_EXT_LABEL
#define GIF_EXTENSION_INTRODUCER
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
enum AVMediaType codec_type
AVIOContext * pb
I/O context.
static int frame_start(MpegEncContext *s)
int total_iter
loop options
BYTE int const BYTE int int int height
Describe the class of an AVClass context structure.
int delay
Time span in hundredths of second before the next frame should be drawn on screen.
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
This structure contains the data a format has to probe a file.
unsigned int avio_rl16(AVIOContext *s)
static const uint8_t gif89a_sig[6]
void * priv_data
Format private data.
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.
This structure stores compressed data.