summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-23 15:08:13 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-23 15:08:13 +0000
commitdaeaccca155541ad3511f3f606a537c3f40a0686 (patch)
treed30f040d517c2d1d818fbd7a54add933e345b91a /src
parent3ac22ac7ea2e4df156ca9e8d23f16993099fd582 (diff)
various bugfixes for 0.10.4
git-svn-id: https://svn.musicpd.org/mpd/branches/branch-0.10.3@1143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/flac_decode.c3
-rw-r--r--src/interface.c2
-rw-r--r--src/mp3_decode.c3
-rw-r--r--src/path.c4
-rw-r--r--src/player.c2
5 files changed, 8 insertions, 6 deletions
diff --git a/src/flac_decode.c b/src/flac_decode.c
index afb5bcf74..5604799ad 100644
--- a/src/flac_decode.c
+++ b/src/flac_decode.c
@@ -116,7 +116,8 @@ void flacPlayFile(char *file, Buffer * cb, AudioFormat * af,
dc->seek = 0;
}
}
- FLAC__file_decoder_process_until_end_of_file(flacDec);
+ /* I don't think we need this bit here! =shank */
+ /*FLAC__file_decoder_process_until_end_of_file(flacDec);*/
if(!dc->stop) {
flacPrintErroredState(FLAC__file_decoder_get_state(flacDec),
file);
diff --git a/src/interface.c b/src/interface.c
index 79445c380..f83765f0a 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -554,7 +554,7 @@ int interfacePrintWithFD(int fd,char * buffer) {
interface = interfaces+i;
- while(buflen>0) {
+ while(buflen>0 && !interface->expired) {
copylen = buflen>
interface->outBufSize-interface->outBuflen?
interface->outBufSize-interface->outBuflen:
diff --git a/src/mp3_decode.c b/src/mp3_decode.c
index 618f6f5ef..90ec3b239 100644
--- a/src/mp3_decode.c
+++ b/src/mp3_decode.c
@@ -144,6 +144,7 @@ void initMp3DecodeData(mp3DecodeData * data) {
data->currentFrame = 0;
data->flush = 1;
mad_stream_init(&data->stream);
+ data->stream.options |= MAD_OPTION_IGNORECRC;
mad_frame_init(&data->frame);
mad_synth_init(&data->synth);
mad_timer_reset(&data->timer);
@@ -227,8 +228,8 @@ int decodeNextFrame(mp3DecodeData * data) {
return DECODE_BREAK;
}
}
-#ifdef HAVE_ID3TAG
if(mad_frame_decode(&data->frame,&data->stream)) {
+#ifdef HAVE_ID3TAG
if((data->stream).error==MAD_ERROR_LOSTSYNC) {
signed long tagsize = id3_tag_query(
(data->stream).this_frame,
diff --git a/src/path.c b/src/path.c
index e209b671d..93d1a8c68 100644
--- a/src/path.c
+++ b/src/path.c
@@ -25,7 +25,7 @@
#include <string.h>
#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LANGINFO_CODESET
#include <locale.h>
#include <langinfo.h>
#endif
@@ -94,7 +94,7 @@ void initPaths() {
charset = strdup(getConf()[CONF_FS_CHARSET]);
}
#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LANGINFO_CODESET
else if((originalLocale = setlocale(LC_CTYPE,NULL))) {
char * temp;
char * currentLocale;
diff --git a/src/player.c b/src/player.c
index e0628de6c..31a3bcf1a 100644
--- a/src/player.c
+++ b/src/player.c
@@ -390,7 +390,7 @@ int playerSeek(FILE * fp, char * utf8file, float time) {
if(strcmp(pc->file,file)!=0) {
decodeType = playerGetDecodeType(utf8file);
if(decodeType < 0) {
- printf("%s unknown file type: %s\n",
+ myfprintf(fp,"%s unknown file type: %s\n",
COMMAND_RESPOND_ERROR, utf8file);
return -1;
}