Mercurial > pidgin.yaz
changeset 19384:630938110521
Cleanup playbin on error. Thanks, Elliott Sales de Andrade. Fixes #2663
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 23 Aug 2007 00:43:57 +0000 |
parents | bd18c02bba9f |
children | 3bc55836f621 |
files | finch/gntsound.c pidgin/gtksound.c |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntsound.c Wed Aug 22 23:27:38 2007 +0000 +++ b/finch/gntsound.c Thu Aug 23 00:43:57 2007 +0000 @@ -409,14 +409,14 @@ GError *err = NULL; switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - gst_element_set_state(play, GST_STATE_NULL); - gst_object_unref(GST_OBJECT(play)); - break; case GST_MESSAGE_ERROR: gst_message_parse_error(msg, &err, NULL); purple_debug_error("gstreamer", "%s\n", err->message); g_error_free(err); + /* fall-through and clean up */ + case GST_MESSAGE_EOS: + gst_element_set_state(play, GST_STATE_NULL); + gst_object_unref(GST_OBJECT(play)); break; case GST_MESSAGE_WARNING: gst_message_parse_warning(msg, &err, NULL);
--- a/pidgin/gtksound.c Wed Aug 22 23:27:38 2007 +0000 +++ b/pidgin/gtksound.c Thu Aug 23 00:43:57 2007 +0000 @@ -364,14 +364,14 @@ GError *err = NULL; switch (GST_MESSAGE_TYPE (msg)) { - case GST_MESSAGE_EOS: - gst_element_set_state(play, GST_STATE_NULL); - gst_object_unref(GST_OBJECT(play)); - break; case GST_MESSAGE_ERROR: gst_message_parse_error(msg, &err, NULL); purple_debug_error("gstreamer", "%s\n", err->message); g_error_free(err); + /* fall-through and clean up */ + case GST_MESSAGE_EOS: + gst_element_set_state(play, GST_STATE_NULL); + gst_object_unref(GST_OBJECT(play)); break; case GST_MESSAGE_WARNING: gst_message_parse_warning(msg, &err, NULL);