]> git.sesse.net Git - ffmpeg/blobdiff - tools/ffeval.c
Merge commit 'c3e58f8fb75d8467161a65b85eb88281547ebab1'
[ffmpeg] / tools / ffeval.c
index 4f60688b128caa48febd4d5fef682bb11e1187e4..66b103294f683a7ceb1cbc40c7347ebc91f12bae 100644 (file)
@@ -118,12 +118,13 @@ int main(int argc, char **argv)
 
             buf[count] = 0;
             if (buf[0] != '#') {
-                av_expr_parse_and_eval(&d, buf,
-                                       NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL, 0, NULL);
+                int ret = av_expr_parse_and_eval(&d, buf,
+                                                 NULL, NULL,
+                                                 NULL, NULL, NULL, NULL, NULL, 0, NULL);
                 if (echo)
                     fprintf(outfile, "%s ", buf);
-                fprintf(outfile, "%s%f\n", prompt, d);
+                if (ret >= 0) fprintf(outfile, "%s%f\n", prompt, d);
+                else          fprintf(outfile, "%s%s\n", prompt, av_err2str(ret));
             }
             count = 0;
         } else {