summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-23 22:47:14 +0200
committerwm4 <wm4@nowhere>2014-09-23 23:11:55 +0200
commit601fb2f93a1afa261a073665146587d16848086b (patch)
tree9bdbd3ebedc40232ee920ec14853639244b403b4 /audio/out
parent81bf9a196303f9d7a37db9365fc75022cb1eff19 (diff)
downloadmpv-601fb2f93a1afa261a073665146587d16848086b.tar.bz2
mpv-601fb2f93a1afa261a073665146587d16848086b.tar.xz
ao_pulse: use pa_stream_new_extended()
Needed for compressed audio pass-through later.
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao_pulse.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c
index fa8a6a46be..1591ba6e3f 100644
--- a/audio/out/ao_pulse.c
+++ b/audio/out/ao_pulse.c
@@ -274,6 +274,7 @@ static int init(struct ao *ao)
struct pa_sample_spec ss;
struct pa_channel_map map;
pa_proplist *proplist = NULL;
+ pa_format_info *format = NULL;
struct priv *priv = ao->priv;
char *host = priv->cfg_host && priv->cfg_host[0] ? priv->cfg_host : NULL;
char *sink = priv->cfg_sink && priv->cfg_sink[0] ? priv->cfg_sink : NULL;
@@ -347,9 +348,11 @@ static int init(struct ao *ao)
(void)pa_proplist_sets(proplist, PA_PROP_MEDIA_ICON_NAME,
PULSE_CLIENT_NAME);
- if (!(priv->stream = pa_stream_new_with_proplist(priv->context,
- "audio stream", &ss,
- &map, proplist)))
+ if (!(format = pa_format_info_from_sample_spec(&ss, &map)))
+ goto unlock_and_fail;
+
+ if (!(priv->stream = pa_stream_new_extended(priv->context, "audio stream",
+ &format, 1, proplist)))
goto unlock_and_fail;
pa_proplist_free(proplist);
@@ -392,6 +395,8 @@ unlock_and_fail:
pa_threaded_mainloop_unlock(priv->mainloop);
fail:
+ if (format)
+ pa_format_info_free(format);
if (priv->context) {
if (!(pa_context_errno(priv->context) == PA_ERR_CONNECTIONREFUSED
&& ao->probing))