Accepting request 879365 from multimedia:libs

OBS-URL: https://build.opensuse.org/request/show/879365
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pulseaudio?expand=0&rev=179
This commit is contained in:
Dominique Leuenberger 2021-03-17 19:14:04 +00:00 committed by Git OBS Bridge
commit b60b09d210
3 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From b230da0d948573f4e17f12285373235369099dd8 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@arcor.de>
Date: Mon, 15 Mar 2021 13:01:28 +0100
Subject: [PATCH] parecord: fix "Failed to open audio file" for FLAC and OGG
This patch fixes the following error:
$ pacat --file-format=ogg -r test.ogg
Failed to open audio file.
$ parecord sep.flac
Failed to open audio file.
libsndfile errors out if a WAV or OGG file is set to have anything but
SF_ENDIAN_FILE:
https://github.com/libsndfile/libsndfile/commit/f4d1646e5cd96444a75c6327a9d49739f81d251e
Signed-off-by: Martin Wilck <mwilck@arcor.de>
---
src/utils/pacat.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 4d2ecf717..31da073bc 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -1062,6 +1062,15 @@ int main(int argc, char *argv[]) {
}
sfi.format |= file_format;
+
+ /*
+ * Endianness has been set in pa_sndfile_write_sample_spec(), but
+ * libsndfile errors out if endianness is set to anything other than
+ * SF_ENDIAN_FILE for OGG or FLAC. Clear it.
+ */
+ if (file_format == SF_FORMAT_OGG || file_format == SF_FORMAT_FLAC)
+ sfi.format = (sfi.format & ~SF_FORMAT_ENDMASK) | SF_ENDIAN_FILE;
+
}
if (!(sndfile = sf_open_fd(mode == RECORD ? STDOUT_FILENO : STDIN_FILENO,
--
2.26.2

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 15 12:31:20 UTC 2021 - Martin Wilck <mwilck@suse.com>
- Fix "Failed to open audio file" for FLAC and OGG (bsc#1183546)
parecord-fix-Failed-to-open-audio-file-for-FLAC-and-.patch
-------------------------------------------------------------------
Mon Mar 1 16:22:36 CET 2021 - tiwai@suse.de

View File

@ -52,6 +52,7 @@ Patch1: suppress-socket-error-msg.diff
Patch5: qpaeq-shebang.patch
# PATCH-FIX-OPENSUSE Workaround for old systemd on Leap 15.x
Patch6: pulseaudio-old-systemd-workaround.patch
Patch7: parecord-fix-Failed-to-open-audio-file-for-FLAC-and-.patch
# HFP support patches (bsc#1167940)
Patch101: 0001-bluetooth-use-consistent-profile-names.patch
Patch102: 0002-bluetooth-separate-HSP-and-HFP.patch
@ -361,6 +362,7 @@ Optional dependency offering zsh completion for various PulseAudio utilities
%if 0%{?suse_version} < 1550
%patch6 -p1
%endif
%patch7 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1