if (fread(picture_buf, 1, y_size * 3 / 2, in_file) <= 0) {
printf("Failed to read raw data! \n");
return false;
}
The fread function, read data from the file stream, if unsuccessful or read to the end of the file, return 0
if (fread(picture_buf, 1, y_size * 3 / 2, in_file) <= 0) {
printf("Failed to read raw data! \n");
return false;
}
The fread function, read data from the file stream, if unsuccessful or read to the end of the file, return 0