#35 Display bug in verbose mode

closed-fixed
3
2004-09-26
2004-06-18
Nicolas Bonifas
No

Hi, when playing several files one after another, using
a star (*), and the verbose (-v) option, the remaining
frames counter doesn't refresh between files, and thus
provides incorrect informations (after 0, it jumps to
2^32 and substracts frames from this number). Thanks
for your work.

Discussion

  • Logged In: YES
    user_id=719421

    I wrote a patch, the bug was trivial to correct:

    --- mpg321.c 2002-03-24 06:49:20.000000000 +0100
    +++ mpg321.c.new 2004-06-18 18:09:57.000000000 +0200
    @@ -284,6 +284,7 @@

    signal(SIGINT, SIG_DFL);

    + current_frame = 0;
    playbuf.buf = NULL;
    playbuf.fd = -1;
    playbuf.length = 0;

     
    • priority: 5 --> 3
     
  • Logged In: YES
    user_id=719421

    And this one for beauty!

    --- mad.c 2002-03-24 06:49:31.000000000 +0100
    +++ mad.c.new 2004-06-18 21:37:10.000000000 +0200
    @@ -277,7 +277,7 @@
    if (!options.skip_printing_frames
    || (options.skip_printing_frames &&
    !(current_frame % options.skip_printing_frames)))
    fprintf(stderr, "Frame# %5lu [%5lu], Time: %s
    [%s], \r", current_frame,
    - playbuf->num_frames > 0 ?
    playbuf->num_frames - current_frame : 0,
    long_currenttime_str, long_remaintime_str);
    + (playbuf->num_frames > 0 &&
    playbuf->num_frames - current_frame <= playbuf->num_frames)
    ? playbuf->num_frames - current_frame : 0,
    long_currenttime_str, long_remaintime_str);
    }

    else if (options.opt & MPG321_REMOTE_PLAY)

     
  • Logged In: YES
    user_id=712646

    Fixed in subversion...

     
    • assigned_to: hoserhead --> sbdep
    • status: open --> closed-fixed