diff options
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/mpa.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 4d6c52f2b3..4b49775029 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c | |||
@@ -424,24 +424,22 @@ next_track: | |||
424 | 424 | ||
425 | /* Fill the buffer */ | 425 | /* Fill the buffer */ |
426 | if (stream.next_frame) | 426 | if (stream.next_frame) |
427 | ci->advance_buffer_loc((void *)stream.next_frame); | 427 | ci->advance_buffer(stream.next_frame - stream.buffer); |
428 | else | 428 | else |
429 | ci->advance_buffer(size); | 429 | ci->advance_buffer(size); |
430 | stream.error = 0; | 430 | stream.error = 0; /* Must get new inputbuffer next time */ |
431 | file_end++; | 431 | file_end++; |
432 | continue; | 432 | continue; |
433 | } else if (MAD_RECOVERABLE(stream.error)) { | 433 | } else if (MAD_RECOVERABLE(stream.error)) { |
434 | /* Probably syncing after a seek */ | ||
434 | continue; | 435 | continue; |
435 | } else { | 436 | } else { |
436 | /* Some other unrecoverable error */ | 437 | /* Some other unrecoverable error */ |
437 | status = CODEC_ERROR; | 438 | status = CODEC_ERROR; |
438 | break; | 439 | break; |
439 | } | 440 | } |
440 | break; | ||
441 | } | 441 | } |
442 | 442 | ||
443 | file_end = 0; | ||
444 | |||
445 | /* Do the pcmbuf insert here. Note, this is the PREVIOUS frame's pcm | 443 | /* Do the pcmbuf insert here. Note, this is the PREVIOUS frame's pcm |
446 | data (not the one just decoded above). When we exit the decoding | 444 | data (not the one just decoded above). When we exit the decoding |
447 | loop we will need to process the final frame that was decoded. */ | 445 | loop we will need to process the final frame that was decoded. */ |
@@ -479,9 +477,11 @@ next_track: | |||
479 | } | 477 | } |
480 | 478 | ||
481 | if (stream.next_frame) | 479 | if (stream.next_frame) |
482 | ci->advance_buffer_loc((void *)stream.next_frame); | 480 | ci->advance_buffer(stream.next_frame - stream.buffer); |
483 | else | 481 | else |
484 | ci->advance_buffer(size); | 482 | ci->advance_buffer(size); |
483 | stream.error = 0; /* Must get new inputbuffer next time */ | ||
484 | file_end = 0; | ||
485 | 485 | ||
486 | framelength = synth.pcm.length - samples_to_skip; | 486 | framelength = synth.pcm.length - samples_to_skip; |
487 | if (framelength < 0) { | 487 | if (framelength < 0) { |