diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
index 14b4021..eed81fc 100644
--- a/libs/gst/base/gstbasesink.c
+++ b/libs/gst/base/gstbasesink.c
@@ -3256,14 +3256,24 @@ gst_base_sink_get_times (GstBaseSink * basesink, GstBuffer * buffer,
 static gboolean
 gst_base_sink_needs_preroll (GstBaseSink * basesink)
 {
-  gboolean is_prerolled, res;
+  gboolean is_prerolled, needs_preroll, res;
+  GstBaseSinkClass *bclass;
+
+  bclass = GST_BASE_SINK_GET_CLASS (basesink);
 
   /* we have 2 cases where the PREROLL_LOCK is released:
    *  1) we are blocking in the PREROLL_LOCK and thus are prerolled.
    *  2) we are syncing on the clock
    */
   is_prerolled = basesink->have_preroll || basesink->priv->received_eos;
-  res = !is_prerolled;
+
+  if (G_LIKELY (bclass->needs_preroll)) {
+    needs_preroll = bclass->needs_preroll (basesink);
+  }
+  else {
+    needs_preroll = TRUE;
+  }
+  res = needs_preroll && !is_prerolled ;
 
   GST_DEBUG_OBJECT (basesink, "have_preroll: %d, EOS: %d => needs preroll: %d",
       basesink->have_preroll, basesink->priv->received_eos, res);
diff --git a/libs/gst/base/gstbasesink.h b/libs/gst/base/gstbasesink.h
index f503753..cc33250 100644
--- a/libs/gst/base/gstbasesink.h
+++ b/libs/gst/base/gstbasesink.h
@@ -187,8 +187,12 @@ struct _GstBaseSinkClass {
   /* Render a BufferList */
   GstFlowReturn (*render_list)  (GstBaseSink *sink, GstBufferList *buffer_list);
 
+  /* subclass can override decision on whether prerolling is required.
+     with PREROLL_LOCK */
+  gboolean      (*needs_preroll)(GstBaseSink *sink);
+
   /*< private >*/
-  gpointer       _gst_reserved[GST_PADDING_LARGE-5];
+  gpointer       _gst_reserved[GST_PADDING_LARGE-6];
 };
 
 GType gst_base_sink_get_type(void);
