Revision a2704c97 libavformat/wav.c

View differences:

libavformat/wav.c
102 102
        ff_end_tag(pb, wav->data);
103 103

  
104 104
        /* update file size */
105
        file_size = url_ftell(pb);
105
        file_size = avio_tell(pb);
106 106
        avio_seek(pb, 4, SEEK_SET);
107 107
        avio_wl32(pb, (uint32_t)(file_size - 8));
108 108
        avio_seek(pb, file_size, SEEK_SET);
......
252 252
    if (!size) {
253 253
        wav->data_end = INT64_MAX;
254 254
    } else
255
        wav->data_end= url_ftell(pb) + size;
255
        wav->data_end= avio_tell(pb) + size;
256 256

  
257 257
    if (!sample_count && st->codec->channels && av_get_bits_per_sample(st->codec->codec_id))
258 258
        sample_count = (size<<3) / (st->codec->channels * (uint64_t)av_get_bits_per_sample(st->codec->codec_id));
......
296 296

  
297 297
    st = s->streams[0];
298 298

  
299
    left = wav->data_end - url_ftell(s->pb);
299
    left = wav->data_end - avio_tell(s->pb);
300 300
    if (left <= 0){
301 301
        if (CONFIG_W64_DEMUXER && wav->w64)
302 302
            left = find_guid(s->pb, guid_data) - 24;
......
304 304
            left = find_tag(s->pb, MKTAG('d', 'a', 't', 'a'));
305 305
        if (left < 0)
306 306
            return AVERROR_EOF;
307
        wav->data_end= url_ftell(s->pb) + left;
307
        wav->data_end= avio_tell(s->pb) + left;
308 308
    }
309 309

  
310 310
    size = MAX_SIZE;
......
421 421
        av_log(s, AV_LOG_ERROR, "could not find data guid\n");
422 422
        return -1;
423 423
    }
424
    wav->data_end = url_ftell(pb) + size - 24;
424
    wav->data_end = avio_tell(pb) + size - 24;
425 425
    wav->w64      = 1;
426 426

  
427 427
    return 0;

Also available in: Unified diff