Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mediaPlayer.getCurrentPosition() > mediaPlayer.getDuration() at the end of playing mp3 file

I'm playing mp3 file streamed from the network in my application, some mp3 files has weird behavior: mediaPlayer.getCurrentPosition() is larger than mediaPlayer.getDuration() at the end, for about 3 seconds.

The mp3 files are CBR encoded.

What might be the reason of this?

like image 642
wong2 Avatar asked Apr 24 '17 10:04

wong2


1 Answers

Finally solved the problem by converting the mp3 files, this is the command I'm using:

lame --mp3input -t -m s -b 128 --cbr input.mp3 output.mp3

like image 99
wong2 Avatar answered Sep 18 '22 23:09

wong2