diff options
author | James Almer <jamrial@gmail.com> | 2019-05-08 06:45:15 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-05-09 01:27:20 +0300 |
commit | f713e25030bbe8deaf6266246f78b4e5d3a05bf7 (patch) | |
tree | 2e6e9ddf40e8ffebd6b644098915e31e169d2a2d /tools/dav1d.c | |
parent | 11da4086e59f81393255a1c1786a990f9fa565b9 (diff) |
Add a DAV1D_ERR define to negate errno values when needed
Diffstat (limited to 'tools/dav1d.c')
-rw-r--r-- | tools/dav1d.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/dav1d.c b/tools/dav1d.c index 8edcb75..63a658a 100644 --- a/tools/dav1d.c +++ b/tools/dav1d.c @@ -129,7 +129,7 @@ int main(const int argc, char *const *const argv) { do { memset(&p, 0, sizeof(p)); if ((res = dav1d_send_data(c, &data)) < 0) { - if (res != -EAGAIN) { + if (res != DAV1D_ERR(EAGAIN)) { fprintf(stderr, "Error decoding frame: %s\n", strerror(-res)); break; @@ -137,7 +137,7 @@ int main(const int argc, char *const *const argv) { } if ((res = dav1d_get_picture(c, &p)) < 0) { - if (res != -EAGAIN) { + if (res != DAV1D_ERR(EAGAIN)) { fprintf(stderr, "Error decoding frame: %s\n", strerror(-res)); break; @@ -168,7 +168,7 @@ int main(const int argc, char *const *const argv) { // flush if (res == 0) while (!cli_settings.limit || n_out < cli_settings.limit) { if ((res = dav1d_get_picture(c, &p)) < 0) { - if (res != -EAGAIN) { + if (res != DAV1D_ERR(EAGAIN)) { fprintf(stderr, "Error decoding frame: %s\n", strerror(-res)); } else { |