mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 05:56:31 +00:00
gst/gstbin.c: Fix for #321595
Original commit message from CVS: * gst/gstbin.c: (gst_bin_change_state_func): Fix for #321595
This commit is contained in:
parent
1cbf6f7027
commit
5252cefbed
2 changed files with 22 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-11-21 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstbin.c: (gst_bin_change_state_func):
|
||||
Fix for #321595
|
||||
|
||||
2005-11-21 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstsegment.h:
|
||||
|
|
23
gst/gstbin.c
23
gst/gstbin.c
|
@ -1643,12 +1643,23 @@ gst_bin_change_state_func (GstElement * element, GstStateChange transition)
|
|||
|
||||
bin = GST_BIN_CAST (element);
|
||||
|
||||
/* Clear message list on next PAUSED */
|
||||
if (next == GST_STATE_PAUSED) {
|
||||
GST_OBJECT_LOCK (bin);
|
||||
GST_DEBUG_OBJECT (element, "clearing EOS elements");
|
||||
bin_remove_messages (bin, NULL, GST_MESSAGE_EOS);
|
||||
GST_OBJECT_UNLOCK (bin);
|
||||
switch (next) {
|
||||
case GST_STATE_PAUSED:
|
||||
/* Clear EOS list on next PAUSED */
|
||||
GST_OBJECT_LOCK (bin);
|
||||
GST_DEBUG_OBJECT (element, "clearing EOS elements");
|
||||
bin_remove_messages (bin, NULL, GST_MESSAGE_EOS);
|
||||
GST_OBJECT_UNLOCK (bin);
|
||||
break;
|
||||
case GST_STATE_READY:
|
||||
/* Clear message list on next READY */
|
||||
GST_OBJECT_LOCK (bin);
|
||||
GST_DEBUG_OBJECT (element, "clearing all cached messages");
|
||||
bin_remove_messages (bin, NULL, GST_MESSAGE_ANY);
|
||||
GST_OBJECT_UNLOCK (bin);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* iterate in state change order */
|
||||
|
|
Loading…
Reference in a new issue