MADPLAY trim bug in OpenWrt

Found interesting bug in OpenWRT madplay build.

It always trims last second of playing file on quit. If it runs with multiple input files, all of them except the last one are playing till the end, but the last one still trims 1 second.
madplay "FILE"

But! If madplay output is piped to aplay even the last file plays till the end.
madplay "FILE" -R 44100 -o raw:- | aplay -f S16_LE -r 44100 -
This is an acceptable workaround. But still, bug exists and maybe we can fix it? Any ideas where to look first?

madplay is old and pretty much unmaintained at this point, you're much better off using mpg123 instead which is maintained and a lot faster. I should also probably mention that ffmpeg is also (at least 4.X) a lot faster than libmad but is quite a bit larger (and more capable).

1 Like

Thanks for the advice! mpg123 may be a good replacement. I don't have much space in my firmware build, so something big like ffmpeg never gonna fit, even with custom configuration, but with mpg123 I may have a success.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.