1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

tools/ffeval: Check return value of av_expr_parse_and_eval()

Fixes CID1026745

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-06-02 22:48:03 +02:00
parent 636c2dd438
commit de488525e5

View File

@ -118,12 +118,13 @@ int main(int argc, char **argv)
buf[count] = 0; buf[count] = 0;
if (buf[0] != '#') { if (buf[0] != '#') {
av_expr_parse_and_eval(&d, buf, int ret = av_expr_parse_and_eval(&d, buf,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, 0, NULL); NULL, NULL, NULL, NULL, NULL, 0, NULL);
if (echo) if (echo)
fprintf(outfile, "%s ", buf); 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; count = 0;
} else { } else {