diff --git a/ChangeLog b/ChangeLog index 11dd77a457..b6fa9a5bd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-01-18 Wim Taymans + + * gst/elements/gstfilesrc.c: (gst_filesrc_getrange), + (gst_filesrc_open_file), (gst_filesrc_activate), + (filesrc_find_peek), (gst_filesrc_type_find): + Fix task creation again. + 2005-01-18 Wim Taymans * docs/design/part-states.txt: diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index e562b82259..c5283f9eb5 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -929,18 +929,17 @@ gst_filesrc_activate (GstPad * pad, GstActivateMode mode) switch (mode) { case GST_ACTIVATE_PUSH: - /* try to start the task */ - GST_STREAM_LOCK (pad); - filesrc->task = gst_element_create_task (GST_ELEMENT (filesrc), - (GstTaskFunction) gst_filesrc_loop, filesrc); + /* if we have a scheduler we can start the task */ + if (GST_ELEMENT_SCHEDULER (filesrc)) { + GST_STREAM_LOCK (pad); + GST_RPAD_TASK (pad) = + gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (filesrc), + (GstTaskFunction) gst_filesrc_loop, pad); - if (filesrc->task) { - gst_task_start (filesrc->task); + gst_task_start (GST_RPAD_TASK (pad)); result = TRUE; - } else { - result = FALSE; + GST_STREAM_UNLOCK (pad); } - GST_STREAM_UNLOCK (pad); break; case GST_ACTIVATE_PULL: result = TRUE; diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index e562b82259..c5283f9eb5 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -929,18 +929,17 @@ gst_filesrc_activate (GstPad * pad, GstActivateMode mode) switch (mode) { case GST_ACTIVATE_PUSH: - /* try to start the task */ - GST_STREAM_LOCK (pad); - filesrc->task = gst_element_create_task (GST_ELEMENT (filesrc), - (GstTaskFunction) gst_filesrc_loop, filesrc); + /* if we have a scheduler we can start the task */ + if (GST_ELEMENT_SCHEDULER (filesrc)) { + GST_STREAM_LOCK (pad); + GST_RPAD_TASK (pad) = + gst_scheduler_create_task (GST_ELEMENT_SCHEDULER (filesrc), + (GstTaskFunction) gst_filesrc_loop, pad); - if (filesrc->task) { - gst_task_start (filesrc->task); + gst_task_start (GST_RPAD_TASK (pad)); result = TRUE; - } else { - result = FALSE; + GST_STREAM_UNLOCK (pad); } - GST_STREAM_UNLOCK (pad); break; case GST_ACTIVATE_PULL: result = TRUE;