From: Andy Wingo Date: Wed, 12 Oct 2005 11:49:35 +0000 (+0000) Subject: gst/gstpad.c (gst_pad_pause_task): Actually return FALSE if there is no task. Shouldn... X-Git-Tag: RELEASE-0_9_4~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3cc492c7e29f4d4bbd93bce40de320c9fe62d66;p=platform%2Fupstream%2Fgstreamer.git gst/gstpad.c (gst_pad_pause_task): Actually return FALSE if there is no task. Shouldn't affect any code, as nothing i... Original commit message from CVS: 2005-10-12 Andy Wingo * gst/gstpad.c (gst_pad_pause_task): Actually return FALSE if there is no task. Shouldn't affect any code, as nothing in our plugins checks this return value. (gst_pad_stop_task): Also take the stream lock if the pad has no task. Docs updated. --- diff --git a/ChangeLog b/ChangeLog index 57508c0..687fdfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-10-12 Andy Wingo + + * gst/gstpad.c (gst_pad_pause_task): Actually return FALSE if + there is no task. Shouldn't affect any code, as nothing in our + plugins checks this return value. + (gst_pad_stop_task): Also take the stream lock if the pad has no + task. Docs updated. + 2005-10-12 Wim Taymans * gst/gstpad.c: (pre_activate), (post_activate), diff --git a/common b/common index 37ed26e..2485a65 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 37ed26e33bae9a6ab256c62ebbb9d711374a0abb +Subproject commit 2485a65b662de25fb7b71857e34411426c6f530c diff --git a/gst/gstpad.c b/gst/gstpad.c index 284fb19..8db93b5 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -3672,8 +3672,10 @@ gst_pad_pause_task (GstPad * pad) no_task: { + GST_WARNING_OBJECT (pad, + "pad has no task -- very likely a programming error"); GST_UNLOCK (pad); - return TRUE; + return FALSE; } } @@ -3688,8 +3690,10 @@ no_task: * This function will deadlock if called from the GstTaskFunction of * the task. Use #gst_task_pause() instead. * - * Returns: a TRUE if the task could be stopped or FALSE when the pad - * has no task. + * Regardless of whether the pad has a task, the stream lock is acquired and + * released so as to ensure that streaming through this pad has finished. + * + * Returns: a TRUE if the task could be stopped or FALSE on error. */ gboolean gst_pad_stop_task (GstPad * pad) @@ -3718,6 +3722,10 @@ gst_pad_stop_task (GstPad * pad) no_task: { GST_UNLOCK (pad); + + GST_STREAM_LOCK (pad); + GST_STREAM_UNLOCK (pad); + return TRUE; } }