mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
Fix return value of pa_sndfile_format_from_string
This prevented to use pacat --file-format option correctly
This commit is contained in:
parent
d963b868de
commit
84c8b23c7f
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue