Revision a1b79792 libavformat/gxfenc.c

View differences:

libavformat/gxfenc.c
224 224
    /* media file name */
225 225
    avio_w8(pb, TRACK_NAME);
226 226
    avio_w8(pb, strlen(ES_NAME_PATTERN) + 3);
227
    put_tag(pb, ES_NAME_PATTERN);
227
    avio_write(pb, ES_NAME_PATTERN, sizeof(ES_NAME_PATTERN) - 1);
228 228
    avio_wb16(pb, sc->media_info);
229 229
    avio_w8(pb, 0);
230 230

  
......
269 269
    GXFContext *gxf = s->priv_data;
270 270
    AVIOContext *pb = s->pb;
271 271
    int64_t pos;
272
    int len;
272 273
    const char *filename = strrchr(s->filename, '/');
273 274

  
274 275
    pos = url_ftell(pb);
......
279 280
        filename++;
280 281
    else
281 282
        filename = s->filename;
283
    len = strlen(filename);
284

  
282 285
    avio_w8(pb, MAT_NAME);
283
    avio_w8(pb, strlen(SERVER_PATH) + strlen(filename) + 1);
284
    put_tag(pb, SERVER_PATH);
285
    put_tag(pb, filename);
286
    avio_w8(pb, strlen(SERVER_PATH) + len + 1);
287
    avio_write(pb, SERVER_PATH, sizeof(SERVER_PATH) - 1);
288
    avio_write(pb, filename, len);
286 289
    avio_w8(pb, 0);
287 290

  
288 291
    /* first field */

Also available in: Unified diff