1
0
Fork 0
forked from len0rd/rockbox

Opus: fix glitch caused by 2e9aa3d

Change-Id: I1519f3bf2cdf74f3d4741951973352b2678b7722
This commit is contained in:
Nils Wallménius 2013-05-21 22:37:11 +02:00
parent 71b9685dcd
commit de86b4a3c5

View file

@ -385,18 +385,18 @@ enum codec_status codec_run(void)
stream_init = 1; 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 */ /* Add page to the bitstream */
ogg_stream_pagein(&os, &og); ogg_stream_pagein(&os, &og);
page_granule = ogg_page_granulepos(&og); page_granule = ogg_page_granulepos(&og);
granule_pos = page_granule; 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) { while ((ogg_stream_packetout(&os, &op) == 1) && !op.e_o_s) {
if (op.packetno == 0){ if (op.packetno == 0){
/* identification header */ /* identification header */