Go to the documentation of this file.
36 int datatype, filetype,
t1,
t2, nb_comments;
42 if (memcmp(buf,
"SAUCE00", 7))
45 #define GET_SAUCE_META(name,size) \
46 if (avio_read(pb, buf, size) == size && buf[0]) { \
48 av_dict_set(&avctx->metadata, name, buf, 0); \
65 if (got_width && datatype && filetype) {
66 if ((datatype == 1 && filetype <=2) || (datatype == 5 && filetype == 255) || datatype == 6) {
73 }
else if (datatype == 5) {
85 if (nb_comments > 0) {
86 avio_seek(pb, start_pos - 64*nb_comments - 5, SEEK_SET);
87 if (
avio_read(pb, buf, 5) == 5 && !memcmp(buf,
"COMNT", 5)) {
90 *
fsize -= 64*nb_comments + 5;
93 for (
i = 0;
i < nb_comments;
i++) {
96 str[65*
i + 64] =
'\n';
AVStream ** streams
A list of all streams in the file.
int64_t avio_size(AVIOContext *s)
Get the filesize.
unsigned int avio_rl16(AVIOContext *s)
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
AVDictionary * metadata
Metadata that applies to the whole file.
static int get_height(const FieldMatchContext *fm, const AVFrame *f, int plane, int input)
static int64_t fsize(FILE *f)
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVIOContext * pb
I/O context.
#define GET_SAUCE_META(name, size)
int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int get_height)
int avio_r8(AVIOContext *s)
#define i(width, name, range_min, range_max)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.