summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2013-05-19 12:18:43 +0200
committerNils Wallménius <nils@rockbox.org>2013-05-19 14:19:09 +0200
commit2e9aa3d8b04ff56fad4ffb2f855e40dfffbd827b (patch)
tree316ef641e2e7bd50e25d00d801d3c0a70407f79a
parentc7124b552044ef92a128481d32df081d1210cbe1 (diff)
downloadrockbox-2e9aa3d8b04ff56fad4ffb2f855e40dfffbd827b.tar.gz
rockbox-2e9aa3d8b04ff56fad4ffb2f855e40dfffbd827b.tar.bz2
rockbox-2e9aa3d8b04ff56fad4ffb2f855e40dfffbd827b.zip
Opus: avoid allocating space for comment packets
Fixes playback of files with large embedded album art. Change-Id: I94d336e3da968a93047dd00a5fa65e4c3423a7da
-rw-r--r--lib/rbcodec/codecs/opus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/opus.c b/lib/rbcodec/codecs/opus.c
index d72b9cc708..86ddb31936 100644
--- a/lib/rbcodec/codecs/opus.c
+++ b/lib/rbcodec/codecs/opus.c
@@ -384,6 +384,12 @@ 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);