summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2008-04-23 00:17:00 +0000
committerYouness Alaoui <youness.alaoui@collabora.co.uk>2008-04-23 00:17:00 +0000
commit5dd2daa0cb2a2db5af20411ca024b8be462523e0 (patch)
treebb8ee73ed427da9e626da67267b2cee0d8373d5a /gst
parent047c1da05f9fb73e64b4ed35331b454de267220b (diff)
downloadlibnice-5dd2daa0cb2a2db5af20411ca024b8be462523e0.tar.gz
return WRONG_STATE if unlocked and do not modify flow_ret from outside the streaming thread
darcs-hash:20080423001715-4f0f6-aedb50231ebdb4f1296d4e98e91fd675453c97a7.gz
Diffstat (limited to 'gst')
-rw-r--r--gst/gstnicesrc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/gstnicesrc.c b/gst/gstnicesrc.c
index b7f9216..d3c6dda 100644
--- a/gst/gstnicesrc.c
+++ b/gst/gstnicesrc.c
@@ -220,7 +220,6 @@ gst_nice_src_unlock (GstBaseSrc *src)
GST_OBJECT_LOCK (src);
nicesrc->unlocked = TRUE;
- nicesrc->flow_ret = GST_FLOW_WRONG_STATE;
g_main_loop_quit (nicesrc->mainloop);
@@ -240,7 +239,6 @@ gst_nice_src_unlock_stop (GstBaseSrc *src)
GST_OBJECT_LOCK (src);
nicesrc->unlocked = FALSE;
- nicesrc->flow_ret = GST_FLOW_OK;
g_source_destroy (nicesrc->idle_source);
nicesrc->idle_source = NULL;
GST_OBJECT_UNLOCK (src);
@@ -263,7 +261,7 @@ gst_nice_src_create (
GST_OBJECT_LOCK (basesrc);
if (nicesrc->unlocked) {
GST_OBJECT_UNLOCK (basesrc);
- return nicesrc->flow_ret;
+ return GST_FLOW_WRONG_STATE;
}
GST_OBJECT_UNLOCK (basesrc);
@@ -271,9 +269,11 @@ gst_nice_src_create (
if (nicesrc->outbuf) {
*buffer = nicesrc->outbuf;
+ return nicesrc->flow_ret;
+ } else {
+ return GST_FLOW_WRONG_STATE;
}
- return nicesrc->flow_ret;
}
static void