shithub: dav1d

Download patch

ref: e034611481726b74bab496907bb0675942be4d04
parent: 04dc8a4d629fbefa7dc5f3614ce95a94a0b32f46
author: Marvin Scholz <epirat07@gmail.com>
date: Wed May 22 07:39:09 EDT 2019

tools: Use DAV1D_ERR for strerror calls

--- a/tools/dav1d.c
+++ b/tools/dav1d.c
@@ -216,7 +216,7 @@
         if ((res = dav1d_send_data(c, &data)) < 0) {
             if (res != DAV1D_ERR(EAGAIN)) {
                 fprintf(stderr, "Error decoding frame: %s\n",
-                        strerror(-res));
+                        strerror(DAV1D_ERR(res)));
                 break;
             }
         }
@@ -224,7 +224,7 @@
         if ((res = dav1d_get_picture(c, &p)) < 0) {
             if (res != DAV1D_ERR(EAGAIN)) {
                 fprintf(stderr, "Error decoding frame: %s\n",
-                        strerror(-res));
+                        strerror(DAV1D_ERR(res)));
                 break;
             }
             res = 0;
@@ -260,7 +260,7 @@
         if ((res = dav1d_get_picture(c, &p)) < 0) {
             if (res != DAV1D_ERR(EAGAIN)) {
                 fprintf(stderr, "Error decoding frame: %s\n",
-                        strerror(-res));
+                        strerror(DAV1D_ERR(res)));
             } else {
                 res = 0;
                 break;