I found the generic seek will invoke the flac_read_timestamp function. It read exta packet will slow down the seek time https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/flacdec.c#L224
2015-09-24 17:27 GMT+08:00 Ching-Yi Chan <chingyichan...@gmail.com>: > Hi Hendrik, > > I move the index data into AVStream, but seeking is slow. (it try to > download many data). > Is there something wrong ? > > 2015-09-24 16:09 GMT+08:00 Hendrik Leppkes <h.lepp...@gmail.com>: > >> On Thu, Sep 24, 2015 at 9:08 AM, Ching-Yi Chan <chingyichan...@gmail.com> >> wrote: >> > flacdec is not supported fast-seek yet. >> > >> > changes: >> > >> > 1. parse the seekpoint from metadata block >> > 2. add seek callback to look up seek position >> > >> >> You should store the index in the AVStream index_entries field, that >> way you don't need to duplicate the structure in the private flac >> context, and the generic seeking code can make use of them without you >> needing a specialized seekign function. >> >> - Hendrik >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel