diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-07-12 12:01:20 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-07-12 12:01:20 +0000 |
commit | c03d6a8757ef14a0fbf324650fec0a2af416a557 (patch) | |
tree | 1057dd09e96db8c1c59f4dd0f2aa1db4ef1fd2a9 | |
parent | b5c2a72a4aefef6f27f91caf1fef5d1ab5350c64 (diff) |
gst/playback/gstplaybasebin.c: Clear the dynamic pads counter when starting a new uri. This makes reusing playbin wor...
Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (no_more_pads_full),
(setup_source):
Clear the dynamic pads counter when starting a new uri. This makes
reusing playbin work again.
Fixes #454264.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gst/playback/gstplaybasebin.c | 12 |
2 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2007-07-12 Wim Taymans <wim.taymans@gmail.com> + + * gst/playback/gstplaybasebin.c: (no_more_pads_full), + (setup_source): + Clear the dynamic pads counter when starting a new uri. This makes + reusing playbin work again. + Fixes #454264. + 2007-07-12 Stefan Kost <ensonic@users.sf.net> * configure.ac: diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index 0a8998cd..d7390df5 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -1051,11 +1051,13 @@ no_more_pads_full (GstElement * element, gboolean subs, if (!g_object_get_data (G_OBJECT (element), "pending")) return; - GST_DEBUG_OBJECT (element, "remove pending"); - g_object_set_data (G_OBJECT (element), "pending", NULL); play_base_bin->pending--; + + GST_DEBUG_OBJECT (element, "remove pending, now %d pending", + play_base_bin->pending); + if (play_base_bin->pending == 0) { /* we can commit this group for playback now */ group_commit (play_base_bin, play_base_bin->is_stream, subs); @@ -1988,6 +1990,9 @@ setup_source (GstPlayBaseBin * play_base_bin) /* remove our previous preroll queues */ remove_groups (play_base_bin); + /* clear pending dynamic elements */ + play_base_bin->pending = 0; + /* do subs */ if (subbin) { GstElement *db; @@ -2006,6 +2011,9 @@ setup_source (GstPlayBaseBin * play_base_bin) g_object_set_data (G_OBJECT (db), "pending", "1"); play_base_bin->pending++; + GST_DEBUG_OBJECT (play_base_bin, "we have subtitles, %d pending", + play_base_bin->pending); + if (!play_base_bin->is_stream) { GstStateChangeReturn sret; |