Revision f59d8ff8 libavformat/flvdec.c

View differences:

libavformat/flvdec.c
277 277
    }
278 278

  
279 279
    offset = avio_rb32(s->pb);
280
    url_fseek(s->pb, offset, SEEK_SET);
280
    avio_seek(s->pb, offset, SEEK_SET);
281 281
    url_fskip(s->pb, 4);
282 282

  
283 283
    s->start_time = 0;
......
337 337
        else /* skip packet */
338 338
            av_log(s, AV_LOG_DEBUG, "skipping flv packet: type %d, size %d, flags %d\n", type, size, flags);
339 339
    skip:
340
        url_fseek(s->pb, next, SEEK_SET);
340
        avio_seek(s->pb, next, SEEK_SET);
341 341
        continue;
342 342
    }
343 343

  
......
361 361
       ||(st->discard >= AVDISCARD_BIDIR  &&  ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_DISP_INTER && !is_audio))
362 362
       || st->discard >= AVDISCARD_ALL
363 363
       ){
364
        url_fseek(s->pb, next, SEEK_SET);
364
        avio_seek(s->pb, next, SEEK_SET);
365 365
        continue;
366 366
    }
367 367
    if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY)
......
374 374
        int size;
375 375
        const int64_t pos= url_ftell(s->pb);
376 376
        const int64_t fsize= url_fsize(s->pb);
377
        url_fseek(s->pb, fsize-4, SEEK_SET);
377
        avio_seek(s->pb, fsize-4, SEEK_SET);
378 378
        size= avio_rb32(s->pb);
379
        url_fseek(s->pb, fsize-3-size, SEEK_SET);
379
        avio_seek(s->pb, fsize-3-size, SEEK_SET);
380 380
        if(size == avio_rb24(s->pb) + 11){
381 381
            uint32_t ts = avio_rb24(s->pb);
382 382
            ts |= avio_r8(s->pb) << 24;
383 383
            s->duration = ts * (int64_t)AV_TIME_BASE / 1000;
384 384
        }
385
        url_fseek(s->pb, pos, SEEK_SET);
385
        avio_seek(s->pb, pos, SEEK_SET);
386 386
    }
387 387

  
388 388
    if(is_audio){

Also available in: Unified diff