mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +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>
|
2005-11-21 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/gstsegment.h:
|
* 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);
|
bin = GST_BIN_CAST (element);
|
||||||
|
|
||||||
/* Clear message list on next PAUSED */
|
switch (next) {
|
||||||
if (next == GST_STATE_PAUSED) {
|
case GST_STATE_PAUSED:
|
||||||
GST_OBJECT_LOCK (bin);
|
/* Clear EOS list on next PAUSED */
|
||||||
GST_DEBUG_OBJECT (element, "clearing EOS elements");
|
GST_OBJECT_LOCK (bin);
|
||||||
bin_remove_messages (bin, NULL, GST_MESSAGE_EOS);
|
GST_DEBUG_OBJECT (element, "clearing EOS elements");
|
||||||
GST_OBJECT_UNLOCK (bin);
|
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 */
|
/* iterate in state change order */
|
||||||
|
|
Loading…
Reference in a new issue