if (bclass->unlock_stop)
bclass->unlock_stop (basesink);
- /* we need preroll again and we set the flag before unlocking the clockid
- * because if the clockid is unlocked before a current buffer expired, we
- * can use that buffer to preroll with */
- basesink->need_preroll = TRUE;
-
if (basesink->clock_id) {
GST_DEBUG_OBJECT (basesink, "unschedule clock");
gst_clock_id_unschedule (basesink->clock_id);
if (!gst_base_sink_needs_preroll (basesink)) {
GST_DEBUG_OBJECT (basesink, "PLAYING to PAUSED, we are prerolled");
basesink->playing_async = FALSE;
+ basesink->need_preroll = FALSE;
} else {
if (GST_STATE_TARGET (GST_ELEMENT (basesink)) <= GST_STATE_READY) {
GST_DEBUG_OBJECT (basesink, "element is <= READY");
GST_DEBUG_OBJECT (basesink,
"PLAYING to PAUSED, we are not prerolled");
basesink->playing_async = TRUE;
+ basesink->need_preroll = TRUE;
priv->commited = FALSE;
priv->call_preroll = TRUE;
if (priv->async_enabled) {