diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-05-14 02:03:01 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-05-14 02:03:01 +0000 |
commit | 9c48ed116c33e4f3ec559e8e479e4b948bcd4e1a (patch) | |
tree | 8467e18b0ce92d89dbd5c4875abbc8fe70799b7f | |
parent | 8baa1a46e3a0995e2609bad7052676f9e86dd9a2 (diff) | |
download | pulseaudio-9c48ed116c33e4f3ec559e8e479e4b948bcd4e1a.tar.gz |
update pipe source for glitch-free, too
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2418 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/modules/module-pipe-sink.c | 1 | ||||
-rw-r--r-- | src/modules/module-pipe-source.c | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c index f172e2009..cc648928c 100644 --- a/src/modules/module-pipe-sink.c +++ b/src/modules/module-pipe-sink.c @@ -230,7 +230,6 @@ int pa__init(pa_module*m) { pa_sample_spec ss; pa_channel_map map; pa_modargs *ma; - char *t; struct pollfd *pollfd; pa_sink_new_data data; diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c index 5bf4da1f0..c2f464b8f 100644 --- a/src/modules/module-pipe-source.c +++ b/src/modules/module-pipe-source.c @@ -160,6 +160,7 @@ static void thread_func(void *userdata) { goto finish; pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL); + if (pollfd->revents & ~POLLIN) { pa_log("FIFO shutdown."); goto fail; @@ -182,7 +183,6 @@ int pa__init(pa_module*m) { pa_sample_spec ss; pa_channel_map map; pa_modargs *ma; - char *t; struct pollfd *pollfd; pa_source_new_data data; @@ -207,7 +207,7 @@ int pa__init(pa_module*m) { u->rtpoll = pa_rtpoll_new(); pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll); - u->filename = pa_xstrdup(pa_modargs_get_value(ma, "file", DEFAULT_FILE_NAME)); + u->filename = pa_runtime_path(pa_modargs_get_value(ma, "file", DEFAULT_FILE_NAME)); mkfifo(u->filename, 0666); if ((u->fd = open(u->filename, O_RDWR|O_NOCTTY)) < 0) { @@ -233,8 +233,7 @@ int pa__init(pa_module*m) { data.module = m; pa_source_new_data_set_name(&data, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME)); pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->filename); - pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, t = pa_sprintf_malloc("Unix FIFO source %s", u->filename)); - pa_xfree(t); + pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Unix FIFO source %s", u->filename); pa_source_new_data_set_sample_spec(&data, &ss); pa_source_new_data_set_channel_map(&data, &map); |