package: v4l2test: Fix zero size file for rawdata format

This commit is contained in:
mason.huo
2022-08-03 16:07:57 +08:00
parent 9234eab162
commit 5c3b022a79
3 changed files with 23 additions and 2 deletions
+3 -1
View File
@@ -614,7 +614,9 @@ static void mainloop()
exit(EXIT_FAILURE);
}
if (!gp_cfg_param->rec_fp && gp_cfg_param->jpegFilename) {
if (!gp_cfg_param->rec_fp &&
gp_cfg_param->jpegFilename &&
!is_raw_v4l2fmt(gp_cfg_param->v4l2_param.format)) {
gp_cfg_param->rec_fp = fopen(gp_cfg_param->jpegFilename, "w+");
if (!gp_cfg_param->rec_fp) {
LOG(STF_LEVEL_ERR, "can't open %s\n", gp_cfg_param->jpegFilename);