Skip to content

Commit

Permalink
[rcp] Fix for RCP devices not getting removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ejurgensen committed Aug 7, 2024
1 parent 96cd401 commit dab9089
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/outputs/rcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,18 +1298,17 @@ rcp_mdns_device_cb(const char *name, const char *type, const char *domain, const
device->default_format = MEDIA_FORMAT_WAV;
device->supported_formats = MEDIA_FORMAT_WAV | MEDIA_FORMAT_MP3 | MEDIA_FORMAT_ALAC;

// RCP/Roku Soundbridges only support ipv4
device->v4_address = safe_strdup(address);
device->v4_port = port; // -1 if we are removing

if (port < 0 || !address)
{
ret = player_device_remove(device);
}
else
{
// RCP/Roku Soundbridges only support ipv4
device->v4_address = strdup(address);
device->v4_port = port;

DPRINTF(E_INFO, L_RCP, "Adding RCP output device '%s' at '%s'\n", name, address);

ret = player_device_add(device);
}

Expand Down

0 comments on commit dab9089

Please sign in to comment.