- gst_task_set_lock(priv->decoder_task, &priv->decoder_task_lock);
- return gst_task_start(priv->decoder_task);
+ gst_task_set_lock(decoder->priv->decoder_task, &decoder->priv->decoder_task_lock);
+ return gst_task_start(decoder->priv->decoder_task);
+}
+
+/**
+ * gst_vaapi_decoder_pause:
+ * @decoder: a #GstVaapiDecoder
+ *
+ * Pauses the decoder. It can be made active again through
+ * gst_vaapi_decoder_start() or definitely stopped through
+ * gst_vaapi_decoder_stop().
+ *
+ * Return value: %TRUE on success
+ */
+gboolean
+gst_vaapi_decoder_pause(GstVaapiDecoder *decoder)
+{
+ g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), FALSE);
+
+ return gst_task_pause(decoder->priv->decoder_task);