From 2e9aa3d8b04ff56fad4ffb2f855e40dfffbd827b Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Sun, 19 May 2013 12:18:43 +0200 Subject: Opus: avoid allocating space for comment packets Fixes playback of files with large embedded album art. Change-Id: I94d336e3da968a93047dd00a5fa65e4c3423a7da --- lib/rbcodec/codecs/opus.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3