Menu

#234 Problem issuing LOAD after a STOP command.

1.23.x
closed-fixed
nobody
None
5
2016-09-08
2016-06-29
No

Hi!

I am trying to use the remote control interface (-R, --remote) of mpg123. However there seem to be a bug when stopping the player using STOP. Trying to LOAD a new mp3 after a STOP result in:

main: [src/mpg123.c:822] error: Deep trouble! Cannot flush to my output anymore!

Steps to reproduce:

  1. mpg123 -R
  2. LOAD /path/to/music.mp3
  3. STOP
  4. LOAD /path/to/music.mp3

Results in:

$ mpg123 -R

@R MPG123 (ThOr) v8
LOAD /path/to/music.mp3
@I ID3v2.title....
Loads of stuff here....
STOP
@P 0
LOAD /path/to/music.mp3
@I ID3v2.title....
A lot less stuff here....
@P 2
main: [src/mpg123.c:822] error: Deep trouble! Cannot flush to my output anymore!

This can be reproduced in at least 1.23.4 and 1.23.5. I could not reproduce it on the version bundled in Debian Jessie (version 1.20.1).

I have built mpg123 with the --with-default-audio=alsa. Other commands, such as PAUSE, does not have the same result. Only STOP.

Discussion

  • Johan Anderholm

    Johan Anderholm - 2016-06-29

    I managed to trace the problem to the 1.23.0 release. I am not able to reproduce the problem in 1.22.4, but it occurs in 1.23.0

     
    • Thomas Orgis

      Thomas Orgis - 2016-06-29

      Ah, finally the remote control regressions come in. This is due to
      calling the wrong libout123 API function on STOP. When you load a track
      with different properties (channel count, sampling rate), it will work.
      Only if the audio format does not change, mpg123 has no reason to
      reinitialise the audio output when playing the new track.

      The right thing is to call out123_pause(), which does not deconfigure
      things, instead of out123_stop(). A simple blunder on my part.

      May you build and test https://mpg123.org/snapshot and report if it
      fixes things? I guess I'll have to do a 1.23.6 release. Hm interesting
      numerology in there, too. You have 1 and 2, added this gives 3, adding
      1, 2, and 3 yields 6, the patchlevel number. Well, if you're into such
      stuff;-)

       
      • Johan Anderholm

        Johan Anderholm - 2016-06-30

        The snapshot works fine. I've tried STOPing and LOADing several times and it works well.

        Thank you for the fast fix!

         
  • Thomas Orgis

    Thomas Orgis - 2016-06-30
    • status: open --> closed-fixed
     
  • Will

    Will - 2016-09-08

    Hi!
    I'm using version 1.23.6 and I have a similar issue when using OSX with the remote control option.

    If I manually stop the playback of a file, then I can load another file and it will play correctly.
    But if the file stops automatically because of the final of the file, then I'm unable to load anything...

    I'm not completly sure if it has some relation with this bug, so if you prefer I can create another ticket detailling how to reproduce it.

    Thank you!

     
    • Thomas Orgis

      Thomas Orgis - 2016-09-08

      Yeah, it might be related, but please do a new report for the slightly
      different issue. If it is a similar blunder, it should be very easy to
      reproduce. But it also would be strange if that happens for everyone, as
      this would be a rather fundamental flaw.

      Please also test if this happens only with proper audio output
      (coreaudio) … compare with -o dummy or -t.

       

Log in to post a comment.

MongoDB Logo MongoDB