Revision 899605f1

View differences:

libavformat/iff.c
51 51
#define ID_NAME       MKTAG('N','A','M','E')
52 52
#define ID_TEXT       MKTAG('T','E','X','T')
53 53
#define ID_BODY       MKTAG('B','O','D','Y')
54
#define ID_ANNO       MKTAG('A','N','N','O')
54 55

  
55 56
#define LEFT    2
56 57
#define RIGHT   4
......
99 100
    uint32_t chunk_id, data_size;
100 101
    int padding, done = 0;
101 102
    int compression = -1;
103
    char *buf;
102 104

  
103 105
    st = av_new_stream(s, 0);
104 106
    if (!st)
......
156 158
            url_fskip(pb, 4); // source page width, height
157 159
            break;
158 160

  
161
        case ID_ANNO:
162
            buf = av_malloc(data_size + 1);
163
            if (!buf)
164
                break;
165
            get_buffer(pb, buf, data_size);
166
            buf[data_size] = 0;
167
            av_metadata_set2(&s->metadata, "comment", buf, AV_METADATA_DONT_STRDUP_VAL);
168
            break;
169

  
159 170
        default:
160 171
            url_fseek(pb, data_size + padding, SEEK_CUR);
161 172
            break;

Also available in: Unified diff