Menu

#186 Printing negative offset messes up progress line

svn
closed-fixed
nobody
None
5
2014-08-20
2013-01-14
No

Start "mpg123 -b 1024 -v -C filename"
After a while, press 'b' to seek back to the beginning.

The progress line will look something like this:
Frame# 293 [13443], Time: 00:01.98 [05:56.83], RVA: off, Vol: 100(100), [ 999936] 00), [ 1010176]

Notice the junk at the end of the line (the last 15 characters or so).

The reason is that for a short time a negative starting offset is printed, like this:
Frame# 0 [13736], Time: 307445734561825860:11.45 [06:04.33], RVA: off, Vol: 100(100), [ 973312]

and this long and invalid time causes the line to be much longer which leaves that garbage on the screen.

I think mpg123_position() should be fixed not to return negative values, or print_stat() should be fixed to change a negative value into 0.

Discussion

  • Thomas Orgis

    Thomas Orgis - 2013-01-14

    I smell the buffer being the culprit for that. Negative offsets are not really expected in any case, but mpg123_position() tries to compensate for buffered-not-yet-played samples.

     
  • Thomas Orgis

    Thomas Orgis - 2013-02-04

    Please check the current http://mpg123.org/snapshot . It should have a fix by printing a minus sign if appropriate. Whether or not you expect negative offsets, they should not mess up the display line anympre;-)

     
  • Thomas Orgis

    Thomas Orgis - 2013-02-24
    • status: open --> closed-fixed
     

Log in to post a comment.