summaryrefslogtreecommitdiff
path: root/apps/codecs/mpa.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/mpa.c')
-rw-r--r--apps/codecs/mpa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c
index 4d6c52f..4b49775 100644
--- a/apps/codecs/mpa.c
+++ b/apps/codecs/mpa.c
@@ -424,24 +424,22 @@ next_track:
/* Fill the buffer */
if (stream.next_frame)
- ci->advance_buffer_loc((void *)stream.next_frame);
+ ci->advance_buffer(stream.next_frame - stream.buffer);
else
ci->advance_buffer(size);
- stream.error = 0;
+ stream.error = 0; /* Must get new inputbuffer next time */
file_end++;
continue;
} else if (MAD_RECOVERABLE(stream.error)) {
+ /* Probably syncing after a seek */
continue;
} else {
/* Some other unrecoverable error */
status = CODEC_ERROR;
break;
}
- break;
}
- file_end = 0;
-
/* Do the pcmbuf insert here. Note, this is the PREVIOUS frame's pcm
data (not the one just decoded above). When we exit the decoding
loop we will need to process the final frame that was decoded. */
@@ -479,9 +477,11 @@ next_track:
}
if (stream.next_frame)
- ci->advance_buffer_loc((void *)stream.next_frame);
+ ci->advance_buffer(stream.next_frame - stream.buffer);
else
ci->advance_buffer(size);
+ stream.error = 0; /* Must get new inputbuffer next time */
+ file_end = 0;
framelength = synth.pcm.length - samples_to_skip;
if (framelength < 0) {