summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVincent Becker <vincentx.becker@intel.com>2010-12-14 18:08:14 +0100
committerColin Guthrie <cguthrie@mandriva.org>2010-12-18 11:25:09 +0000
commit84c8b23c7f6c2bb2bf692fbb2d683a1861d68047 (patch)
tree2c2b3847a9152ec6eaabcc5a3e7ebaf9356bac49 /src
parentd963b868de4d6cce558bc483d521a57a291e45f2 (diff)
Fix return value of pa_sndfile_format_from_string
This prevented to use pacat --file-format option correctly
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/sndfile-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pulsecore/sndfile-util.c b/src/pulsecore/sndfile-util.c
index 4f7f8bdb..9d15a868 100644
--- a/src/pulsecore/sndfile-util.c
+++ b/src/pulsecore/sndfile-util.c
@@ -416,7 +416,7 @@ int pa_sndfile_format_from_string(const char *name) {
pa_assert_se(sf_command(NULL, SFC_GET_FORMAT_MAJOR, &fi, sizeof(fi)) == 0);
if (strcasecmp(name, fi.name) == 0)
- return i;
+ return fi.format;
}
/* Then, try to match via the full extension */
@@ -428,7 +428,7 @@ int pa_sndfile_format_from_string(const char *name) {
pa_assert_se(sf_command(NULL, SFC_GET_FORMAT_MAJOR, &fi, sizeof(fi)) == 0);
if (strcasecmp(name, fi.extension) == 0)
- return i;
+ return fi.format;
}
/* Then, try to match via the start of the type string */
@@ -440,7 +440,7 @@ int pa_sndfile_format_from_string(const char *name) {
pa_assert_se(sf_command(NULL, SFC_GET_FORMAT_MAJOR, &fi, sizeof(fi)) == 0);
if (strncasecmp(name, fi.extension, strlen(name)) == 0)
- return i;
+ return fi.format;
}
return -1;