aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_parser.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-15 09:23:36 +0100
committerMax Kellermann <max@duempel.org>2010-01-16 23:44:54 +0100
commit1abfcc56af7de73c2088d7971f744778b5842ed8 (patch)
treecee3e0021348270f86402b9cb7b016e4b820827d /src/audio_parser.c
parentda47afe7d1aa6b59bf04764d0bd7d0b91dfac94b (diff)
downloadmpd-1abfcc56af7de73c2088d7971f744778b5842ed8.tar.gz
mpd-1abfcc56af7de73c2088d7971f744778b5842ed8.tar.xz
mpd-1abfcc56af7de73c2088d7971f744778b5842ed8.zip
audio_format: support packed 24 bit samples
Diffstat (limited to 'src/audio_parser.c')
-rw-r--r--src/audio_parser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/audio_parser.c b/src/audio_parser.c
index 60318fc99..039ffa1ab 100644
--- a/src/audio_parser.c
+++ b/src/audio_parser.c
@@ -28,6 +28,7 @@
#include "audio_check.h"
#include <assert.h>
+#include <string.h>
#include <stdlib.h>
/**
@@ -97,7 +98,11 @@ parse_sample_format(const char *src, bool mask,
break;
case 24:
- sample_format = SAMPLE_FORMAT_S24_P32;
+ if (memcmp(endptr, "_3", 2) == 0) {
+ sample_format = SAMPLE_FORMAT_S24;
+ endptr += 2;
+ } else
+ sample_format = SAMPLE_FORMAT_S24_P32;
break;
case 32: