# HG changeset patch # User Felipe Contreras # Date 1211407612 0 # Node ID fb87b6d7754369a6ea0902bc93ed234d2928dc05 # Parent be8c6b5cc726cbfc73cc3d9f4055e6afccff63cc A (modified) patch from Felipe to simplify our GStreamer sink selection code. There's no need to initialize autoaudiosink ourselves, as playbin will do that for us if we pass NULL. Fixes #5770 committer: Richard Laager diff -r be8c6b5cc726 -r fb87b6d77543 pidgin/gtksound.c --- a/pidgin/gtksound.c Wed May 21 21:07:22 2008 +0000 +++ b/pidgin/gtksound.c Wed May 21 22:06:52 2008 +0000 @@ -491,26 +491,12 @@ if (purple_running_gnome()) { sink = gst_element_factory_make("gconfaudiosink", "sink"); } - if (!sink) - sink = gst_element_factory_make("autoaudiosink", "sink"); - if (!sink) { - purple_debug_error("sound", "Unable to create GStreamer audiosink.\n"); - return; - } } #ifndef _WIN32 else if (!strcmp(method, "esd")) { sink = gst_element_factory_make("esdsink", "sink"); - if (!sink) { - purple_debug_error("sound", "Unable to create GStreamer audiosink.\n"); - return; - } } else if (!strcmp(method, "alsa")) { sink = gst_element_factory_make("alsasink", "sink"); - if (!sink) { - purple_debug_error("sound", "Unable to create GStreamer audiosink.\n"); - return; - } } #endif else { @@ -518,6 +504,11 @@ return; } + if (strcmp(method, "automatic") != 0 && !sink) { + purple_debug_error("sound", "Unable to create GStreamer audiosink.\n"); + return; + } + play = gst_element_factory_make("playbin", "play"); if (play == NULL) {