Revision f59d8ff8 libavformat/matroskaenc.c

View differences:

libavformat/matroskaenc.c
231 231
{
232 232
    int64_t pos = url_ftell(pb);
233 233

  
234
    if (url_fseek(pb, master.pos - master.sizebytes, SEEK_SET) < 0)
234
    if (avio_seek(pb, master.pos - master.sizebytes, SEEK_SET) < 0)
235 235
        return;
236 236
    put_ebml_num(pb, pos - master.pos, master.sizebytes);
237
    url_fseek(pb, pos, SEEK_SET);
237
    avio_seek(pb, pos, SEEK_SET);
238 238
}
239 239

  
240 240
static void put_xiph_size(AVIOContext *pb, int size)
......
313 313
    currentpos = url_ftell(pb);
314 314

  
315 315
    if (seekhead->reserved_size > 0)
316
        if (url_fseek(pb, seekhead->filepos, SEEK_SET) < 0)
316
        if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0)
317 317
            return -1;
318 318

  
319 319
    metaseek = start_ebml_master(pb, MATROSKA_ID_SEEKHEAD, seekhead->reserved_size);
......
334 334
    if (seekhead->reserved_size > 0) {
335 335
        uint64_t remaining = seekhead->filepos + seekhead->reserved_size - url_ftell(pb);
336 336
        put_ebml_void(pb, remaining);
337
        url_fseek(pb, currentpos, SEEK_SET);
337
        avio_seek(pb, currentpos, SEEK_SET);
338 338

  
339 339
        currentpos = seekhead->filepos;
340 340
    }
......
1163 1163
        // update the duration
1164 1164
        av_log(s, AV_LOG_DEBUG, "end duration = %" PRIu64 "\n", mkv->duration);
1165 1165
        currentpos = url_ftell(pb);
1166
        url_fseek(pb, mkv->duration_offset, SEEK_SET);
1166
        avio_seek(pb, mkv->duration_offset, SEEK_SET);
1167 1167
        put_ebml_float(pb, MATROSKA_ID_DURATION, mkv->duration);
1168 1168

  
1169
        url_fseek(pb, currentpos, SEEK_SET);
1169
        avio_seek(pb, currentpos, SEEK_SET);
1170 1170
    }
1171 1171

  
1172 1172
    end_ebml_master(pb, mkv->segment);

Also available in: Unified diff