Revision 6eb2de74 libavformat/dv.c

View differences:

libavformat/dv.c
358 358
    return offset;
359 359
}
360 360

  
361
void dv_flush_audio_packets(DVDemuxContext *c)
361
void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset)
362 362
{
363
    c->frames= frame_offset;
364
    if (c->ach)
365
        c->abytes= av_rescale(c->frames,
366
                          c->ast[0]->codec->bit_rate * (int64_t)c->sys->frame_rate_base,
367
                          8*c->sys->frame_rate);
363 368
    c->audio_pkt[0].size = c->audio_pkt[1].size = 0;
364 369
}
365 370

  
......
419 424
    DVDemuxContext *c = r->dv_demux;
420 425
    int64_t offset= dv_frame_offset(s, c, timestamp, flags);
421 426

  
422
    c->frames= offset / c->sys->frame_size;
423
    if (c->ach)
424
        c->abytes= av_rescale(c->frames,
425
                          c->ast[0]->codec->bit_rate * (int64_t)c->sys->frame_rate_base,
426
                          8*c->sys->frame_rate);
427
    dv_offset_reset(c, offset / c->sys->frame_size);
427 428

  
428
    dv_flush_audio_packets(c);
429 429
    return url_fseek(&s->pb, offset, SEEK_SET);
430 430
}
431 431

  

Also available in: Unified diff