summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/raac.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-12-22 20:04:28 -0500
committerSolomon Peachy <pizza@shaftnet.org>2018-12-22 20:12:10 -0500
commit9b9b30bd547c829157f3f83c71378f0bbd43241d (patch)
treed4f1df7303881d197e14ef8db1957705667526df /lib/rbcodec/codecs/raac.c
parenteee3f0ce79eb0b2ae2f272e814e10e6e9524c381 (diff)
downloadrockbox-9b9b30bd547c829157f3f83c71378f0bbd43241d.tar.gz
rockbox-9b9b30bd547c829157f3f83c71378f0bbd43241d.zip
Realmedia related codecs fixes and enhancements
* More tolerance to the file format variations. * AC3 coded files in realaudio format are now playable Full credit to Igor Poretsky Change-Id: Id24e94bc00623e89fb8c80403efa92f69ab1e5d7
Diffstat (limited to 'lib/rbcodec/codecs/raac.c')
-rw-r--r--lib/rbcodec/codecs/raac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/raac.c b/lib/rbcodec/codecs/raac.c
index e77d432680..6856afc52e 100644
--- a/lib/rbcodec/codecs/raac.c
+++ b/lib/rbcodec/codecs/raac.c
@@ -109,7 +109,8 @@ enum codec_status codec_run(void)
109 if (resume_offset) { 109 if (resume_offset) {
110 resume_offset -= MIN(resume_offset, rmctx.data_offset + DATA_HEADER_SIZE); 110 resume_offset -= MIN(resume_offset, rmctx.data_offset + DATA_HEADER_SIZE);
111 /* put number of subpackets to skip in resume_offset */ 111 /* put number of subpackets to skip in resume_offset */
112 resume_offset /= (rmctx.block_align + PACKET_HEADER_SIZE); 112 resume_offset /= (rmctx.block_align + PACKET_HEADER_SIZE +
113 ((rmctx.flags & RM_PKT_V1) ? 1 : 0));
113 param = (int)resume_offset * ((rmctx.block_align * 8 * 1000)/rmctx.bit_rate); 114 param = (int)resume_offset * ((rmctx.block_align * 8 * 1000)/rmctx.bit_rate);
114 } 115 }
115 116