diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbcodec/codecs/opus.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rbcodec/codecs/opus.c b/lib/rbcodec/codecs/opus.c index 86ddb31936..5d7d71dfe0 100644 --- a/lib/rbcodec/codecs/opus.c +++ b/lib/rbcodec/codecs/opus.c | |||
@@ -188,7 +188,7 @@ static int64_t seek_backwards(ogg_sync_state *oy, ogg_page *og, | |||
188 | } | 188 | } |
189 | 189 | ||
190 | static int speex_seek_page_granule(int64_t pos, int64_t curpos, | 190 | static int speex_seek_page_granule(int64_t pos, int64_t curpos, |
191 | ogg_sync_state *oy) | 191 | ogg_sync_state *oy, ogg_stream_state *os) |
192 | { | 192 | { |
193 | /* TODO: Someone may want to try to implement seek to packet, | 193 | /* TODO: Someone may want to try to implement seek to packet, |
194 | instead of just to page (should be more accurate, not be any | 194 | instead of just to page (should be more accurate, not be any |
@@ -257,6 +257,7 @@ static int speex_seek_page_granule(int64_t pos, int64_t curpos, | |||
257 | *curbyteoffset = 0; | 257 | *curbyteoffset = 0; |
258 | ci->seek_buffer(*curbyteoffset); | 258 | ci->seek_buffer(*curbyteoffset); |
259 | ogg_sync_reset(oy); | 259 | ogg_sync_reset(oy); |
260 | ogg_stream_reset(os); | ||
260 | return 0; | 261 | return 0; |
261 | } else if (curpos > pos) { /* backwards */ | 262 | } else if (curpos > pos) { /* backwards */ |
262 | offset = seek_backwards(oy,&og,pos); | 263 | offset = seek_backwards(oy,&og,pos); |
@@ -365,7 +366,7 @@ enum codec_status codec_run(void) | |||
365 | 366 | ||
366 | LOGF("Opus seek page:%lld,%lld,%ld\n", | 367 | LOGF("Opus seek page:%lld,%lld,%ld\n", |
367 | seek_target, page_granule, (long)param); | 368 | seek_target, page_granule, (long)param); |
368 | speex_seek_page_granule(seek_target, page_granule, &oy); | 369 | speex_seek_page_granule(seek_target, page_granule, &oy, &os); |
369 | } | 370 | } |
370 | 371 | ||
371 | ci->set_elapsed(param); | 372 | ci->set_elapsed(param); |