X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=subprojects%2Fgstreamer%2Fgst%2Fgstpad.c;h=caf9b36eb24bc7eb2bc32319b68a22b114063e0f;hb=cbcd2a44ff8222867eb91646d17d0d55b5a3eeba;hp=db9893352a12bedd7225611705a3bb7c76775883;hpb=06428afbadf0494abaae22e9101794db302eb7d4;p=platform%2Fupstream%2Fgstreamer.git diff --git a/subprojects/gstreamer/gst/gstpad.c b/subprojects/gstreamer/gst/gstpad.c index db98933..caf9b36 100644 --- a/subprojects/gstreamer/gst/gstpad.c +++ b/subprojects/gstreamer/gst/gstpad.c @@ -6324,6 +6324,7 @@ gst_pad_start_task (GstPad * pad, GstTaskFunction func, gpointer user_data, task = GST_PAD_TASK (pad); if (task == NULL) { task = gst_task_new (func, user_data, notify); + notify = NULL; gst_task_set_lock (task, GST_PAD_GET_STREAM_LOCK (pad)); gst_task_set_enter_callback (task, pad_enter_thread, pad, NULL); gst_task_set_leave_callback (task, pad_leave_thread, pad, NULL); @@ -6345,6 +6346,10 @@ gst_pad_start_task (GstPad * pad, GstTaskFunction func, gpointer user_data, res = gst_task_set_state (task, GST_TASK_STARTED); GST_OBJECT_UNLOCK (pad); + /* free user_data if it wasn't used for gst_task_new */ + if (notify) + notify (user_data); + return res; /* ERRORS */