diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index ba339b56f7..505ea9c069 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -546,9 +546,10 @@ gst_basic_scheduler_eventhandler_proxy (GstPad *srcpad, GstEvent *event) } if (flush) { - GST_INFO (GST_CAT_SCHEDULING, "event is flush"); GstData *data = GST_DATA (GST_RPAD_BUFPEN (srcpad)); + GST_INFO (GST_CAT_SCHEDULING, "event is flush"); + if (data) { GST_INFO (GST_CAT_SCHEDULING, "need to clear some buffers"); diff --git a/gst/schedulers/gstoptimalscheduler.c b/gst/schedulers/gstoptimalscheduler.c index 1cd4945d0a..808c2ff33b 100644 --- a/gst/schedulers/gstoptimalscheduler.c +++ b/gst/schedulers/gstoptimalscheduler.c @@ -951,9 +951,10 @@ gst_opt_scheduler_event_wrapper (GstPad *srcpad, GstEvent *event) } if (flush) { - GST_INFO (GST_CAT_SCHEDULING, "event is flush"); GList *buflist = GST_PAD_BUFLIST (srcpad); + GST_INFO (GST_CAT_SCHEDULING, "event is flush"); + if (buflist) { GST_INFO (GST_CAT_SCHEDULING, "need to clear some buffers"); g_list_foreach (buflist, (GFunc) clear_queued, NULL);