decoder/OggUtil: allow skipping up to 32 kB after seek

Fixes missing song length on high-latency Opus files.

According to tests with 320 kbit/s opus files with 60ms packets, we
need to skip up to 29 kB.
This commit is contained in:
Max Kellermann 2014-04-29 11:56:05 +02:00
parent 0efb67b51e
commit 70bd35abe2
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.18.11 (not yet released) ver 0.18.11 (not yet released)
* decoder
- opus: fix missing song length on high-latency files
* fix race condition when using GLib event loop (non-Linux) * fix race condition when using GLib event loop (non-Linux)
ver 0.18.10 (2014/04/10) ver 0.18.10 (2014/04/10)

View File

@ -81,7 +81,7 @@ bool
OggExpectPageSeek(ogg_sync_state &oy, ogg_page &page, OggExpectPageSeek(ogg_sync_state &oy, ogg_page &page,
Decoder *decoder, InputStream &input_stream) Decoder *decoder, InputStream &input_stream)
{ {
size_t remaining_skipped = 16384; size_t remaining_skipped = 32768;
while (true) { while (true) {
int r = ogg_sync_pageseek(&oy, &page); int r = ogg_sync_pageseek(&oy, &page);