summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-05-23 10:27:54 +0200
committerWim Taymans <wtaymans@redhat.com>2019-05-23 10:27:54 +0200
commiteb6481efb3c3f4288c2e0156940ee10434577a11 (patch)
tree4ff934cdbd269425a3187c30a99d54c3bd744c83
parent78fbcca660c0f09c358db93520ef69c3f7b24b71 (diff)
fmtconvert: also return all formats when not negotiated
Also return all possible formats if the other port was not negotiated.
-rw-r--r--spa/plugins/audioconvert/fmtconvert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/spa/plugins/audioconvert/fmtconvert.c b/spa/plugins/audioconvert/fmtconvert.c
index df4ffb6b..599e20ad 100644
--- a/spa/plugins/audioconvert/fmtconvert.c
+++ b/spa/plugins/audioconvert/fmtconvert.c
@@ -340,7 +340,8 @@ static int port_enum_formats(struct spa_node *node,
else
info.info.raw.format = SPA_AUDIO_FORMAT_S16;
- if (info.info.raw.format == SPA_AUDIO_FORMAT_F32P ||
+ if (!other->have_format ||
+ info.info.raw.format == SPA_AUDIO_FORMAT_F32P ||
info.info.raw.format == SPA_AUDIO_FORMAT_F32) {
spa_pod_builder_add(builder,
SPA_FORMAT_AUDIO_format, SPA_POD_CHOICE_ENUM_Id(18,