int i;
static int dv_read_seek(AVFormatContext *s, int stream_index,                        int64_t timestamp, int flags){    RawDVContext *r = s->priv_data;    DVDemuxContext *c = r->dv_demux;    int i;    int64_t offset= dv_frame_offset(s, c, timestamp, flags);    const DVprofile* sys = dv_codec_profile(&c->vst->codec);    c->frames= offset / sys->frame_size;    c->abytes= av_rescale(c->frames,                          c->ast[0]->codec.bit_rate * (int64_t)sys->frame_rate_base,                          8*sys->frame_rate);    for (i=0; i<c->ach; i++) {       if (c->ast[i] && c->audio_pkt[i].size) {           av_free_packet(&c->audio_pkt[i]);           c->audio_pkt[i].size = 0;       }    }    return url_fseek(&s->pb, offset, SEEK_SET);}