From f60dcb51d52016377320b5f1f472e7d75e172d1d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 17 May 2005 10:41:51 +0000 Subject: [PATCH] tools/gst-launch.c: Message was unreffed too soon. Original commit message from CVS: * tools/gst-launch.c: (event_loop): Message was unreffed too soon. --- ChangeLog | 5 +++++ tools/gst-launch.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 946fabc..73a6b85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-17 Wim Taymans + + * tools/gst-launch.c: (event_loop): + Message was unreffed too soon. + 2005-05-16 Andy Wingo * gst/gstbin.c (sink_iterator_filter): Err... um... diff --git a/tools/gst-launch.c b/tools/gst-launch.c index 76a7d41..b363aea 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -391,13 +391,15 @@ event_loop (GstElement * pipeline, gboolean blocking) GstElementState old, new; gst_message_parse_state_changed (message, &old, &new); - gst_message_unref (message); - if (!(old == GST_STATE_PLAYING && new == GST_STATE_PAUSED)) + if (!(old == GST_STATE_PLAYING && new == GST_STATE_PAUSED)) { + gst_message_unref (message); break; + } g_print (_ ("Element \"%s\" has gone from PLAYING to PAUSED, quitting.\n"), GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message)))); /* cut out of the event loop if check_intr set us to PAUSED */ + gst_message_unref (message); return FALSE; } default: -- 2.7.4