2007-03-29 16:15:28 |
TSeeker |
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 partch 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;
} |
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;
} |
|