diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/a52_rm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/codecs/a52_rm.c b/apps/codecs/a52_rm.c index 12352ed903..c75dea598f 100644 --- a/apps/codecs/a52_rm.c +++ b/apps/codecs/a52_rm.c | |||
@@ -157,15 +157,16 @@ next_track: | |||
157 | ci->advance_buffer(rmctx.data_offset + DATA_HEADER_SIZE ); | 157 | ci->advance_buffer(rmctx.data_offset + DATA_HEADER_SIZE ); |
158 | 158 | ||
159 | /* The main decoding loop */ | 159 | /* The main decoding loop */ |
160 | while(pkt.timestamp < rmctx.duration) { | 160 | while(rmctx.audio_pkt_cnt < rmctx.nb_packets) { |
161 | ci->yield(); | 161 | ci->yield(); |
162 | if (ci->stop_codec || ci->new_track) | 162 | if (ci->stop_codec || ci->new_track) |
163 | break; | 163 | break; |
164 | 164 | ||
165 | if (ci->seek_time) { | 165 | if (ci->seek_time) { |
166 | packet_offset = ci->seek_time / (((rmctx.block_align + PACKET_HEADER_SIZE)*8*1000)/rmctx.bit_rate); | 166 | packet_offset = ci->seek_time / ((rmctx.block_align*8*1000)/rmctx.bit_rate); |
167 | ci->seek_buffer(rmctx.data_offset + DATA_HEADER_SIZE + packet_offset*(rmctx.block_align + PACKET_HEADER_SIZE)); | 167 | ci->seek_buffer(rmctx.data_offset + DATA_HEADER_SIZE + packet_offset*(rmctx.block_align + PACKET_HEADER_SIZE)); |
168 | samplesdone = A52_SAMPLESPERFRAME * packet_offset; | 168 | rmctx.audio_pkt_cnt = packet_offset; |
169 | samplesdone = (rmctx.sample_rate/1000 * ci->seek_time); | ||
169 | ci->seek_complete(); | 170 | ci->seek_complete(); |
170 | } | 171 | } |
171 | 172 | ||