forked from len0rd/rockbox
Submit FS#12164 by Sean Bartell with minor changes by myself. Fixes possible decoding corruption of RealAudio files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30060 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d0084ffd7a
commit
4b0e09c1ac
3 changed files with 5 additions and 4 deletions
|
|
@ -89,7 +89,7 @@ enum codec_status codec_run(void)
|
|||
fs = rmctx.audio_framesize;
|
||||
sps= rmctx.block_align;
|
||||
h = rmctx.sub_packet_h;
|
||||
scrambling_unit_size = h*fs;
|
||||
scrambling_unit_size = h * (fs + PACKET_HEADER_SIZE);
|
||||
|
||||
res = atrac3_decode_init(&q, ci->id3);
|
||||
if(res < 0) {
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ enum codec_status codec_run(void)
|
|||
fs = rmctx.audio_framesize;
|
||||
sps= rmctx.block_align;
|
||||
h = rmctx.sub_packet_h;
|
||||
scrambling_unit_size = h*fs;
|
||||
scrambling_unit_size = h * (fs + PACKET_HEADER_SIZE);
|
||||
|
||||
res =cook_decode_init(&rmctx, &q);
|
||||
if(res < 0) {
|
||||
|
|
|
|||
|
|
@ -541,8 +541,9 @@ int rm_get_packet(uint8_t **src,RMContext *rmctx, RMPacket *pkt)
|
|||
if (!y)
|
||||
rmctx->audiotimestamp = pkt->timestamp;
|
||||
|
||||
advance_buffer(src,12);
|
||||
consumed += 12;
|
||||
/* Skip packet header */
|
||||
advance_buffer(src, PACKET_HEADER_SIZE);
|
||||
consumed += PACKET_HEADER_SIZE;
|
||||
if (rmctx->codec_type == CODEC_COOK || rmctx->codec_type == CODEC_ATRAC) {
|
||||
for(x = 0 ; x < w/sps; x++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue