aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_format.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-23 12:01:03 +0200
committerMax Kellermann <max@duempel.org>2009-07-23 12:01:03 +0200
commit54889c72e3469027a852d9e8ff029d659e612094 (patch)
tree19864296a3807db7b0384d8052c4b12775c33ba6 /src/pcm_format.c
parentcba126ceb8f1830614a8df04a6b4c1a45f955417 (diff)
downloadmpd-54889c72e3469027a852d9e8ff029d659e612094.tar.gz
mpd-54889c72e3469027a852d9e8ff029d659e612094.tar.xz
mpd-54889c72e3469027a852d9e8ff029d659e612094.zip
pcm_convert: use GError for error handling
Don't abort the whole MPD process when the conversion fails. This has been a denial-of-service attack vector for years.
Diffstat (limited to '')
-rw-r--r--src/pcm_format.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/pcm_format.c b/src/pcm_format.c
index 0e686e17c..64e5167b5 100644
--- a/src/pcm_format.c
+++ b/src/pcm_format.c
@@ -21,8 +21,6 @@
#include "pcm_dither.h"
#include "pcm_buffer.h"
-#include <glib.h>
-
static void
pcm_convert_8_to_16(int16_t *out, const int8_t *in,
unsigned num_samples)
@@ -93,7 +91,6 @@ pcm_convert_to_16(struct pcm_buffer *buffer, struct pcm_dither *dither,
return dest;
}
- g_warning("only 8 or 16 bits are supported for conversion!\n");
return NULL;
}
@@ -168,7 +165,6 @@ pcm_convert_to_24(struct pcm_buffer *buffer,
return dest;
}
- g_warning("only 8 or 24 bits are supported for conversion!\n");
return NULL;
}
@@ -243,6 +239,5 @@ pcm_convert_to_32(struct pcm_buffer *buffer,
return src;
}
- g_warning("only 8 or 32 bits are supported for conversion!\n");
return NULL;
}