_pthread_mutex_lock(&private_display->lock);
+ /* dump buffer */
+ if (tdm_dump_enable && !(private_layer->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO))
+ _tdm_layer_dump_buffer(private_layer, buffer);
+
if (tdm_debug_dump & TDM_DUMP_FLAG_LAYER &&
!(private_layer->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO)) {
char str[TDM_PATH_LEN];
TDM_INFO("layer(%p) pending_buffer(%p) committed",
private_layer, private_layer->pending_buffer);
- /* dump buffer */
- if (tdm_dump_enable && !(private_layer->caps.capabilities & TDM_LAYER_CAPABILITY_VIDEO))
- _tdm_layer_dump_buffer(private_layer, private_layer->pending_buffer);
-
if (ret == TDM_ERROR_NONE) {
if (private_layer->waiting_buffer)
_tdm_layer_free_buffer(private_layer, private_layer->waiting_buffer);