XMMS-LiveIce plugin fails due to locale settings

Bug #98555 reported by TSeeker
4
Affects Status Importance Assigned to Milestone
xmms-liveice (Ubuntu)
Confirmed
Undecided
Jose Miguel Parrella

Bug Description

Binary package hint: xmms-liveice

When using some specific locale settings (French in my case), the xmms-liveice fails to run the lame encoder correctly due to bad formatting in the command line parameters it passes to the encoder. Additionally, it doesn't handle SIGCHLD properly, which soon causes the system to be flooded with hundreds of zombies.

Below is a patch that fixes both issues.

diff -Naur xmms-liveice-1.0.0-ori/src/liveice.c xmms-liveice-1.0.0/src/liveice.c
--- xmms-liveice-1.0.0-ori/src/liveice.c 2000-05-14 21:42:20.000000000 +0200
+++ xmms-liveice-1.0.0/src/liveice.c 2007-03-29 13:25:12.000000000 +0200
@@ -24,6 +24,7 @@
 #include "serverlib.h"
 #include <errno.h>
 #include <pthread.h>
+#include <locale.h>

@@ -296,7 +297,7 @@
                        execlp(lv_conf.encoder_path,lv_conf.encoder_path,"-sti","-sto","-qual","1","-br",br,"-nc",ch,"-sr",sr,NULL);

                } else if(lv_conf.encoder==LAME3){
-
+ setlocale(LC_NUMERIC, "C");
                        sprintf(br,"%d",lv_conf.bitrate/1000);
                        sprintf(sr,"%f",lv_conf.sample_rate/1000.0);
                        if(lv_conf.channels==1){
@@ -313,6 +314,7 @@
        }
        /* now - set the read pipe to non-blocking */
        fcntl(lv_conf.read_fd,F_SETFL,O_NONBLOCK);
+ signal(SIGCHLD,SIG_IGN);
        signal(SIGPIPE,SIG_IGN);
        lv_conf.encoder_active=ENCODER_OK;
 }

TSeeker (tseeker)
description: updated
Revision history for this message
Jose Miguel Parrella (bureado) wrote :

Thanks. I'll apply the patch and I'll provide new versions for Debian and Ubuntu soon.

Changed in xmms-liveice:
assignee: nobody → bureado
status: Unconfirmed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.