Go to the documentation of this file.
36 int datatype, filetype,
t1,
t2, nb_comments;
47 if (memcmp(buf,
"SAUCE00", 7))
50 #define GET_SAUCE_META(name,size) \
51 if (avio_read(pb, buf, size) == size && buf[0]) { \
53 av_dict_set(&avctx->metadata, name, buf, 0); \
70 if (got_width && datatype && filetype) {
71 if ((datatype == 1 && filetype <=2) || (datatype == 5 && filetype == 255) || datatype == 6) {
78 }
else if (datatype == 5) {
90 if (nb_comments > 0) {
91 avio_seek(pb, start_pos - 64*nb_comments - 5, SEEK_SET);
92 if (
avio_read(pb, buf, 5) == 5 && !memcmp(buf,
"COMNT", 5)) {
94 char *str =
av_malloc(65*nb_comments + 1);
95 *
fsize -= 64*nb_comments + 5;
98 for (
i = 0;
i < nb_comments;
i++) {
101 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.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.