mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
gst/gstpipeline.c: Do not access variables after they have been deleted.
Original commit message from CVS: * gst/gstpipeline.c: (gst_pipeline_send_event): Do not access variables after they have been deleted.
This commit is contained in:
parent
6e4b02d62b
commit
9909bf96dc
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-05-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/gstpipeline.c: (gst_pipeline_send_event):
|
||||
Do not access variables after they have been deleted.
|
||||
|
||||
2005-05-19 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* tools/gst-inspect.c: (print_plugin_features):
|
||||
|
|
|
@ -289,6 +289,7 @@ gst_pipeline_send_event (GstElement * element, GstEvent * event)
|
|||
gboolean was_playing;
|
||||
gboolean res;
|
||||
GstElementState state;
|
||||
GstEventType event_type = GST_EVENT_TYPE (event);
|
||||
|
||||
/* need to call _get_state() since a bin state is only updated
|
||||
* with this call. FIXME, we should probably not block but just
|
||||
|
@ -296,12 +297,12 @@ gst_pipeline_send_event (GstElement * element, GstEvent * event)
|
|||
gst_element_get_state (element, &state, NULL, NULL);
|
||||
was_playing = state == GST_STATE_PLAYING;
|
||||
|
||||
if (was_playing && GST_EVENT_TYPE (event) == GST_EVENT_SEEK)
|
||||
if (was_playing && event_type == GST_EVENT_SEEK)
|
||||
gst_element_set_state (element, GST_STATE_PAUSED);
|
||||
|
||||
res = GST_ELEMENT_CLASS (parent_class)->send_event (element, event);
|
||||
|
||||
if (was_playing && GST_EVENT_TYPE (event) == GST_EVENT_SEEK)
|
||||
if (was_playing && event_type == GST_EVENT_SEEK)
|
||||
gst_element_set_state (element, GST_STATE_PLAYING);
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue