diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-06-25 14:47:24 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-06-25 14:47:24 +0200 |
commit | d9b7cfc83407e367c194b2db895115870b703aa6 (patch) | |
tree | daf8acd1cf1f825c79ac3f3b590de6ce10a8c52d | |
parent | 7a2b8b682ecb987a7762ef2adc57a3073fcb0ba1 (diff) |
Truncate existing files when writing frames to memory
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | yavta.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1065,7 +1065,7 @@ static void video_save_image(struct device *dev, struct v4l2_buffer *buf, append = true; } - fd = open(filename, O_CREAT | O_WRONLY | (append ? O_APPEND : 0), + fd = open(filename, O_CREAT | O_WRONLY | (append ? O_APPEND : O_TRUNC), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); free(filename); if (fd == -1) |