[FFmpeg-devel] [PATCH v3] fate/api-h264-slice-test: use cleaner error handling
Carl Eugen Hoyos
ceffmpeg at gmail.com
Wed Oct 31 13:44:35 EET 2018
2018-10-30 15:38 GMT+01:00, joshdk at ob-encoder.com <joshdk at ob-encoder.com>:
> while(1) {
> uint16_t size = 0;
> - ssize_t ret = fread(&size, 1, sizeof(uint16_t), fd);
> - if (ret < 0) {
> - perror("Couldn't read size");
> - exit(1);
> - } else if (ret != sizeof(uint16_t))
> +
> + size_t ret = fread(&size, 1, sizeof(uint16_t), file);
> + if (ret != sizeof(uint16_t))
> break;
As said, please split the fix for a compilation issue on msvc
(that from a quick look is wrong on all platforms) that fixes a
regression from the cleanup.
Carl Eugen
More information about the ffmpeg-devel
mailing list