diff options
author | Jean Delvare <jdelvare@suse.de> | 2015-02-11 14:18:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-11 17:28:11 +0100 |
commit | 194165aed8629257b73e53ba951586ed4754cee3 (patch) | |
tree | ba1611a994918d5595612615b7e20f44944d3476 /cmdutils.c | |
parent | edf217ebb7d518be3030184d03b5534033e82d0f (diff) | |
download | ffmpeg-194165aed8629257b73e53ba951586ed4754cee3.tar.gz |
cmdutils: fix success path
Since commit 934f2d2f5c16df8aad9f401a9fd842b5d9a78b11,
cmdutils_read_file() prints a confusing message on success:
IO error: Success
This is because the error message is printed on the success path as
well. Add the missing condition so that it is only printed on error.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c index 6c40df9a01..46d0b4b533 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1912,7 +1912,8 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size) } out: - av_log(NULL, AV_LOG_ERROR, "IO error: %s\n", av_err2str(ret)); + if (ret < 0) + av_log(NULL, AV_LOG_ERROR, "IO error: %s\n", av_err2str(ret)); fclose(f); return ret; } |