From 99b89da7053f4f892d7280c5bec411eae2ef8f61 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 24 Sep 2004 17:33:00 +0000 Subject: [PATCH] gst/playback/gstplaybasebin.c: Only signal the no_more_pads signal when we have added the stream to our list. Original commit message from CVS: * gst/playback/gstplaybasebin.c: (new_decoded_pad): Only signal the no_more_pads signal when we have added the stream to our list. --- ChangeLog | 6 ++++++ gst/playback/gstplaybasebin.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ee27ec7b8..88d275a602 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-24 Wim Taymans + + * gst/playback/gstplaybasebin.c: (new_decoded_pad): + Only signal the no_more_pads signal when we have + added the stream to our list. + 2004-09-24 Wim Taymans * gst/playback/gstplaybasebin.c: (remove_prerolls), diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index c15aa41b65..3c4a301130 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -327,8 +327,6 @@ new_decoded_pad (GstElement * element, GstPad * pad, gboolean last, if (last || !need_preroll) { srcpad = pad; - if (last) - no_more_pads (NULL, play_base_bin); } else { new_element = gen_preroll_element (play_base_bin, pad); srcpad = gst_element_get_pad (new_element, "src"); @@ -342,9 +340,13 @@ new_decoded_pad (GstElement * element, GstPad * pad, gboolean last, gst_element_set_state (new_element, GST_STATE_PAUSED); } + /* add the stream to the list */ info = gst_stream_info_new (srcpad, type, NULL); - play_base_bin->streaminfo = g_list_append (play_base_bin->streaminfo, info); + + /* signal the no more pads after adding the stream */ + if (last) + no_more_pads (NULL, play_base_bin); } static void