gst/base/gstbasesrc.c: Make sure we never call the create function is we got deactivated.

Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_get_range):
Make sure we never call the create function is we
got deactivated.
This commit is contained in:
Wim Taymans 2005-07-19 13:43:50 +00:00
parent ae1ad901e8
commit 737969ce5b
3 changed files with 28 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-07-19 Wim Taymans <wim@fluendo.com>
* gst/base/gstbasesrc.c: (gst_base_src_get_range):
Make sure we never call the create function is we
got deactivated.
2005-07-19 Andy Wingo <wingo@pobox.com>
* gst/parse/parse.l: Attempt to solve bug #172815.

View file

@ -577,6 +577,11 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length,
}
GST_LIVE_UNLOCK (src);
GST_LOCK (pad);
if (GST_PAD_IS_FLUSHING (pad))
goto flushing;
GST_UNLOCK (pad);
if (!GST_FLAG_IS_SET (src, GST_BASE_SRC_STARTED))
goto not_started;
@ -612,6 +617,12 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length,
return ret;
/* ERROR */
flushing:
{
GST_DEBUG_OBJECT (src, "pad is flushing");
GST_UNLOCK (pad);
return GST_FLOW_WRONG_STATE;
}
not_started:
{
GST_DEBUG_OBJECT (src, "getrange but not started");

View file

@ -577,6 +577,11 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length,
}
GST_LIVE_UNLOCK (src);
GST_LOCK (pad);
if (GST_PAD_IS_FLUSHING (pad))
goto flushing;
GST_UNLOCK (pad);
if (!GST_FLAG_IS_SET (src, GST_BASE_SRC_STARTED))
goto not_started;
@ -612,6 +617,12 @@ gst_base_src_get_range (GstPad * pad, guint64 offset, guint length,
return ret;
/* ERROR */
flushing:
{
GST_DEBUG_OBJECT (src, "pad is flushing");
GST_UNLOCK (pad);
return GST_FLOW_WRONG_STATE;
}
not_started:
{
GST_DEBUG_OBJECT (src, "getrange but not started");