mirror of https://github.com/FFmpeg/FFmpeg.git
If a developer using FFmpeg libraries seeks into an earlier position and calls avcodec_flush_buffers() afterwards as recommended, the Vorbis decoder will drop the next frame, since buffer flushing clears the first_frame flag. As a result, the audio samples the calling code receives may be ahead of the requested seek position, which is unacceptable in some use cases such as playing a looping sound effect. This commit records the presentation timestamp of the first frame and determines after that if the new frame is the first frame (possible after seeking to the start) by comparing its pts to the stored pts.pull/388/head
parent
a5ce44f301
commit
8fc2dedfe6
1 changed files with 5 additions and 1 deletions
Loading…
Reference in new issue