mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
parecord: Automatically detect file format from extension
And fix a small bug in pa_sndfile_format_from_string.
This commit is contained in:
parent
ad1e0431fb
commit
aa7bc322e2
2 changed files with 12 additions and 8 deletions
|
|
@ -446,7 +446,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)
|
||||
if (strncasecmp(name, fi.name, strlen(name)) == 0)
|
||||
return fi.format;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue