From 3cecc18807b774338fd88c7b863767d368a22a21 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Mon, 4 May 2020 10:36:24 +0300 Subject: [PATCH] adapter: remove spa_pod_fixate fallback This won't work with WpSpaPod, obviously... --- modules/module-si-adapter.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/modules/module-si-adapter.c b/modules/module-si-adapter.c index b85cae68..61f055f8 100644 --- a/modules/module-si-adapter.c +++ b/modules/module-si-adapter.c @@ -210,25 +210,11 @@ on_node_enum_format_done (WpProxy *proxy, GAsyncResult *res, } if (!choose_sensible_raw_audio_format (formats, &self->format)) { - uint32_t media_type, media_subtype; - struct spa_pod *param; - - g_warning ("failed to choose a sensible audio format"); - - /* fall back to spa_pod_fixate */ - if (formats->len == 0 || - !(param = g_ptr_array_index (formats, 0)) || - spa_format_parse (param, &media_type, &media_subtype) < 0 || - media_type != SPA_MEDIA_TYPE_audio || - media_subtype != SPA_MEDIA_SUBTYPE_raw) { - wp_transition_return_error (transition, - g_error_new (WP_DOMAIN_LIBRARY, WP_LIBRARY_ERROR_OPERATION_FAILED, - "node does not support audio/raw format")); - return; - } - - spa_pod_fixate (param); - spa_format_audio_raw_parse (param, &self->format); + wp_warning_object (self, "failed to choose a sensible audio format"); + wp_transition_return_error (transition, + g_error_new (WP_DOMAIN_LIBRARY, WP_LIBRARY_ERROR_OPERATION_FAILED, + "failed to choose a sensible audio format")); + return; } wp_session_item_set_flag (WP_SESSION_ITEM (self), WP_SI_FLAG_CONFIGURED); -- GitLab