[pulseaudio-commits] 3 commits - src/modules src/pulse src/utils

Arun Raghavan arun at kemper.freedesktop.org
Tue Oct 11 11:09:07 PDT 2011


 src/modules/echo-cancel/module-echo-cancel.c |    9 +++++++++
 src/pulse/utf8.c                             |    7 ++++++-
 src/utils/pacat.c                            |    5 +++++
 3 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 3c4d43d9dc30ec54fe934b4b1370423a98d575f5
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Mon Oct 10 09:27:17 2011 +0200

    pacat: Fail early if the media name cannot be set
    
    Otherwise you get an "invalid argument" error from pa_stream_new later.

diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 3be1f6c..3c8e3c7 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -1103,6 +1103,11 @@ int main(int argc, char *argv[]) {
         if ((t = filename) ||
             (t = pa_proplist_gets(proplist, PA_PROP_APPLICATION_NAME)))
             pa_proplist_sets(proplist, PA_PROP_MEDIA_NAME, t);
+
+        if (!pa_proplist_contains(proplist, PA_PROP_MEDIA_NAME)) {
+            pa_log(_("Failed to set media name."));
+            goto quit;
+        }
     }
 
     /* Set up a new main loop */

commit 3b7c6b21f4f0cd4df6b8cff44512b9640a189dc0
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Mon Oct 10 09:27:16 2011 +0200

    Do something sensible when compiled without iconv support
    
    Without this fix, pacat won't start up, because it is unable to set the stream name.

diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c
index fe7bcd2..773a1f8 100644
--- a/src/pulse/utf8.c
+++ b/src/pulse/utf8.c
@@ -249,11 +249,16 @@ char* pa_locale_to_utf8 (const char *str) {
 
 char* pa_utf8_to_locale (const char *str) {
     pa_assert(str);
-    return NULL;
+
+    return pa_ascii_filter(str);
 }
 
 char* pa_locale_to_utf8 (const char *str) {
     pa_assert(str);
+
+    if (pa_utf8_valid(str))
+        return pa_xstrdup(str);
+
     return NULL;
 }
 

commit 518338ac0e781e13bd893ee2d585af40f3ce04ae
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Mon Oct 10 22:17:55 2011 +0530

    echo-cancel: Close debug files on module unload

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index b17e18f..b1fa791 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -1773,6 +1773,15 @@ void pa__done(pa_module*m) {
     if (u->asyncmsgq)
         pa_asyncmsgq_unref(u->asyncmsgq);
 
+    if (u->save_aec) {
+        if (u->played_file)
+            fclose(u->played_file);
+        if (u->captured_file)
+            fclose(u->captured_file);
+        if (u->canceled_file)
+            fclose(u->canceled_file);
+    }
+
     pa_xfree(u);
 }
 



More information about the pulseaudio-commits mailing list