link: set the object id correctly

Before using the param from EnumFormat as a format param, set the
object ID to PARAM_Format to avoid confusion later on. Clients might
use the object id to enumerate parameters and then fail to enumerate
the current Format because the id is wrong.
This commit is contained in:
Wim Taymans 2019-12-17 11:35:28 +01:00
parent d3f4dda51b
commit 096db6d87d

View file

@ -309,6 +309,8 @@ static int do_negotiate(struct pw_impl_link *this)
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
spa_debug_format(2, NULL, format);
SPA_POD_OBJECT_ID(format) = SPA_PARAM_Format;
if (out_state == PW_IMPL_PORT_STATE_CONFIGURE) {
pw_log_debug(NAME" %p: doing set format on output", this);
if ((res = pw_impl_port_set_param(output,