Package: gmpc-plugins
Version: 11.8.16-2
Severity: normal

I use ogg123 to stream audio with the shout plugin, from an icecast
server fed by (among other things) and MPD daemon controled by GMPC.

ogg123 doesn't stop when sent SIGHUP. this is probably so that you can
start music in a terminal and keep it running when the terminal is
closed, so it makes sense to me.

unfortunately, the shout plugin sends SIGHUP when the player is
stopped, so ogg123 keeps on playing the streams. many users probably
don't notice the issue because in most cases the stream itself stops
and then ogg123 terminates.

but some more professional streams (like mine) have fallbacks
configured, which can play other music like a random mix or a fallback
jingle. in my case, I made a fallback jingle, and it's quite annoying
to hear ogg123 keep on playing when i stop the player.

this should really send SIGTERM instead of SIGHUP, which resolves the
problem.

patch attached.

-- System Information:
Debian Release: 8.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'stable'), (1, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-0.bpo.1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gmpc-plugins depends on:
ii  gmpc                        11.8.16-9
ii  libatk1.0-0                 2.14.0-1
ii  libavahi-client3            0.6.31-5
ii  libavahi-common3            0.6.31-5
ii  libavahi-glib1              0.6.31-5
ii  libc6                       2.19-18+deb8u4
ii  libcairo2                   1.14.0-2.1+deb8u1
ii  libdbus-1-3                 1.8.20-0+deb8u1
ii  libdbus-glib-1-2            0.102-1
ii  libfontconfig1              2.11.0-6.3
ii  libfreetype6                2.5.2-3+deb8u1
ii  libgdk-pixbuf2.0-0          2.31.1-2+deb8u4
ii  libglib2.0-0                2.42.1-1+b1
ii  libgtk2.0-0                 2.24.25-3+deb8u1
ii  libjavascriptcoregtk-1.0-0  2.4.9-1~deb8u1
ii  libmpd1                     0.20.0-1.2
ii  libpango-1.0-0              1.36.8-3
ii  libpangocairo-1.0-0         1.36.8-3
ii  libpangoft2-1.0-0           1.36.8-3
ii  libsoup2.4-1                2.48.0-1
ii  libsqlite3-0                3.8.7.1-1+deb8u1
ii  libtag1c2a                  1.9.1-2.1
ii  libtagc0                    1.9.1-2.1
ii  libwebkitgtk-1.0-0          2.4.9-1~deb8u1
ii  libxml2                     2.9.1+dfsg1-5+deb8u1
ii  zlib1g                      1:1.2.8.dfsg-2+b1

gmpc-plugins recommends no packages.

gmpc-plugins suggests no packages.

-- no debconf information
Description: kill streaming process with SIGTERM

 ogg123 doesn't stop when sent SIGHUP. this is probably so that you
 can start music in a terminal and keep it running when the terminal
 is closed, so it makes sense to me. unfortunately, the shout plugin
 sends SIGHUP when the player is stopped, so ogg123 keeps on
 going. many users probably don't notice the issue because, logically,
 the stream itself should stop working and then ogg123 will terminate,
 but some streams have a fallback configured, which plays the same
 track over and over again.
 
Author: Antoine Beaupré

--- gmpc-plugins-11.8.16.orig/gmpc-shout/src/plugin.c
+++ gmpc-plugins-11.8.16/gmpc-shout/src/plugin.c
@@ -301,7 +301,7 @@ static void stop_ogg123(void)
 	{
 #ifndef __WIN32__
 		printf("killing: %i\n", ogg123_pid);
-		kill (ogg123_pid, SIGHUP);
+		kill (ogg123_pid, SIGTERM);
 #else
 		TerminateProcess (ogg123_pid, 1);
 #endif

Reply via email to