LIST_FOR_EACH_ENTRY_SAFE(b, bb, &private_pp->pending_buffer_list, link) {
LIST_DEL(&b->link);
+ _pthread_mutex_unlock(&private_display->lock);
+ tdm_buffer_unref_backend(b->src);
+ tdm_buffer_unref_backend(b->dst);
+ _pthread_mutex_lock(&private_display->lock);
+ free(b);
}
}
tdm_buffer_unref_backend(b->src);
tdm_buffer_unref_backend(b->dst);
_pthread_mutex_lock(&private_display->lock);
+ free(b);
}
}
TDM_WARNING_IF_FAIL(ret == TDM_ERROR_NONE);
LIST_FOR_EACH_ENTRY_SAFE(b, bb, &commit_buffer_list, commit_link) {
+ LIST_DEL(&b->commit_link);
+
if (!_tdm_pp_find_buffer(&private_pp->buffer_list, b))
continue;
- LIST_DEL(&b->commit_link);
-
if (ret != TDM_ERROR_NONE) {
+ /* Not to call the user release handler when failed.
+ * Do we have to call this function here really?
+ * User better use set_done_handler to know when pp is done. Using
+ * buffer_release_handler is not good.
+ */
tdm_buffer_remove_release_handler_internal(b->src);
tdm_buffer_remove_release_handler_internal(b->dst);