Skip to content
  • Georg Chini's avatar
    sink, source: Fix stream rescue from sinks or sources without port · bdc6b6ff
    Georg Chini authored
    Currently pa_{sink,source}_move_streams_to_default_{sink,source}() check the
    availability of the old sink or source. The sink or source is only marked as
    unavailable if the active port of a sink or source is not available.
    Therefore sinks or sources without port are always considered available,
    even if they are in the process of being unlinked and streams are not
    rescued.
    
    This patch removes the availability check because it is unnecessary. The
    functions are only called if the sink or source becomes unavailable or if
    the default sink or source changes, therefore the default_sink_changed or
    default_source_changed argument can be used as an indicator if the old
    sink or source is still present. In the case that the old default sink or
    source becomes unavailable, the function will be called twice, once when
    the default sink or source changes and once when the old sink or source
    is unlinked.
    bdc6b6ff