if (!i) {
/* first plane for image */
- flags = O_TRUNC | O_CREAT | O_WRONLY | O_APPEND;
+ flags = O_TRUNC | O_CREAT | O_EXCL | O_WRONLY | O_APPEND;
total_size += bin.size;
} else {
/* after first plane for image */
bin.size = queue->framecfg.size[buf->num_planes - 1];
/* last plane for meta */
- flags = O_TRUNC | O_CREAT | O_WRONLY;
+ flags = O_TRUNC | O_CREAT | O_EXCL | O_WRONLY;
total_size = bin.size;
ret = put_filesystem_binary(filename, &bin, flags);
queue->buf_dqe++;
+#ifdef DBG_IMAGE_DUMP
+ fimc_is_debug_dma_dump(queue, buf->index, video->id, DBG_DMA_DUMP_IMAGE);
+#endif
+#ifdef DBG_META_DUMP
+ fimc_is_debug_dma_dump(queue, buf->index, video->id, DBG_DMA_DUMP_META);
+#endif
+
ret = vb2_dqbuf(queue->vbq, buf, blocking);
if (ret) {
mverr("vb2_dqbuf is fail(%d)", vctx, video, ret);
goto p_err;
}
-#ifdef DBG_IMAGE_DUMP
- fimc_is_debug_dma_dump(queue, buf->index, video->id, DBG_DMA_DUMP_IMAGE);
-#endif
-#ifdef DBG_META_DUMP
- fimc_is_debug_dma_dump(queue, buf->index, video->id, DBG_DMA_DUMP_META);
-#endif
-
p_err:
TIME_QUEUE(TMQ_DQ);
return ret;