|
|
@ -51,6 +51,7 @@ |
|
|
|
#define ID_NAME MKTAG('N','A','M','E') |
|
|
|
#define ID_NAME MKTAG('N','A','M','E') |
|
|
|
#define ID_TEXT MKTAG('T','E','X','T') |
|
|
|
#define ID_TEXT MKTAG('T','E','X','T') |
|
|
|
#define ID_BODY MKTAG('B','O','D','Y') |
|
|
|
#define ID_BODY MKTAG('B','O','D','Y') |
|
|
|
|
|
|
|
#define ID_ANNO MKTAG('A','N','N','O') |
|
|
|
|
|
|
|
|
|
|
|
#define LEFT 2 |
|
|
|
#define LEFT 2 |
|
|
|
#define RIGHT 4 |
|
|
|
#define RIGHT 4 |
|
|
@ -99,6 +100,7 @@ static int iff_read_header(AVFormatContext *s, |
|
|
|
uint32_t chunk_id, data_size; |
|
|
|
uint32_t chunk_id, data_size; |
|
|
|
int padding, done = 0; |
|
|
|
int padding, done = 0; |
|
|
|
int compression = -1; |
|
|
|
int compression = -1; |
|
|
|
|
|
|
|
char *buf; |
|
|
|
|
|
|
|
|
|
|
|
st = av_new_stream(s, 0); |
|
|
|
st = av_new_stream(s, 0); |
|
|
|
if (!st) |
|
|
|
if (!st) |
|
|
@ -156,6 +158,15 @@ static int iff_read_header(AVFormatContext *s, |
|
|
|
url_fskip(pb, 4); // source page width, height
|
|
|
|
url_fskip(pb, 4); // source page width, height
|
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case ID_ANNO: |
|
|
|
|
|
|
|
buf = av_malloc(data_size + 1); |
|
|
|
|
|
|
|
if (!buf) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
get_buffer(pb, buf, data_size); |
|
|
|
|
|
|
|
buf[data_size] = 0; |
|
|
|
|
|
|
|
av_metadata_set2(&s->metadata, "comment", buf, AV_METADATA_DONT_STRDUP_VAL); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
url_fseek(pb, data_size + padding, SEEK_CUR); |
|
|
|
url_fseek(pb, data_size + padding, SEEK_CUR); |
|
|
|
break; |
|
|
|
break; |
|
|
|