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  <wingo@pobox.com>

* 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.
This commit is contained in:
Andy Wingo 2005-10-12 11:49:35 +00:00
parent e11ddea888
commit c3cc492c7e
3 changed files with 20 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2005-10-12 Andy Wingo <wingo@pobox.com>
* 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 <wim@fluendo.com>
* gst/gstpad.c: (pre_activate), (post_activate),

2
common

@ -1 +1 @@
Subproject commit 37ed26e33bae9a6ab256c62ebbb9d711374a0abb
Subproject commit 2485a65b662de25fb7b71857e34411426c6f530c

View file

@ -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;
}
}