diff options
author | Nils Wallménius <nils@rockbox.org> | 2013-05-21 22:37:11 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2013-05-21 22:38:18 +0200 |
commit | de86b4a3c5f6e2add2dc7588e6be37c8df2302f0 (patch) | |
tree | 9a9b5c4f464a1a6bfb680ead0e86aeb0fb3ebe56 /lib/rbcodec/codecs/opus.c | |
parent | 71b9685dcd7868f233ce762a07731f6f1fd62adb (diff) | |
download | rockbox-de86b4a3c5f6e2add2dc7588e6be37c8df2302f0.tar.gz rockbox-de86b4a3c5f6e2add2dc7588e6be37c8df2302f0.zip |
Opus: fix glitch caused by 2e9aa3d
Change-Id: I1519f3bf2cdf74f3d4741951973352b2678b7722
Diffstat (limited to 'lib/rbcodec/codecs/opus.c')
-rw-r--r-- | lib/rbcodec/codecs/opus.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rbcodec/codecs/opus.c b/lib/rbcodec/codecs/opus.c index 5d7d71dfe0..15d96ff6fe 100644 --- a/lib/rbcodec/codecs/opus.c +++ b/lib/rbcodec/codecs/opus.c @@ -385,18 +385,18 @@ enum codec_status codec_run(void) stream_init = 1; } - /* Do this to avoid allocating space for huge comment packets - (embedded Album Art) */ - if(os.packetno == 1){ - ogg_sync_reset(&oy); - } - /* Add page to the bitstream */ ogg_stream_pagein(&os, &og); page_granule = ogg_page_granulepos(&og); granule_pos = page_granule; + /* Do this to avoid allocating space for huge comment packets + (embedded Album Art) */ + if(os.packetno == 1 && ogg_stream_packetpeek(&os, &op) != 1){ + ogg_sync_reset(&oy); + } + while ((ogg_stream_packetout(&os, &op) == 1) && !op.e_o_s) { if (op.packetno == 0){ /* identification header */ |