Commit Diff
- Commit:
8e006e859081b250b0aa0cd4398a69939a97859d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- fix mp3 length detection without a call to mpg123_scan the length returned by mpg123_length is not necessarly accurate (well, even in that case it's not guaranteed to be exact, i.e. if a file is modified while it's playing.) fixes the length reporting on some mp3 files i had around.
- Actions:
- Patch | Tree
--- player_123.c +++ player_123.c @@ -66,6 +66,9 @@ play_mp3(int fd, const char **errstr) if (!setup(mh)) goto done; + if (mpg123_scan(mh) != MPG123_OK) + goto done; + player_setduration(mpg123_length(mh)); for (;;) {