summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2017-12-23 12:34:50 -0800
committerAman Gupta <aman@tmm1.net>2017-12-23 12:36:22 -0800
commit9e5e3236f4f2004a505533228cf6a6dd65b0101c (patch)
treecc399d960da1cdf1fc56eab66e7d940c072a0b5b /libavformat
parentb5958ff82eedc8112d28b9d8c5aaee6b3329fa81 (diff)
downloadffmpeg-streaming-9e5e3236f4f2004a505533228cf6a6dd65b0101c.zip
ffmpeg-streaming-9e5e3236f4f2004a505533228cf6a6dd65b0101c.tar.gz
avformat/internal: fix compile error with some versions of g++
Fixes #6926 Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/internal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index de4b784..e76ac12 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -541,8 +541,11 @@ static inline int ff_rename(const char *oldpath, const char *newpath, void *logc
int ret = 0;
if (rename(oldpath, newpath) == -1) {
ret = AVERROR(errno);
- if (logctx)
- av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", oldpath, newpath, av_err2str(ret));
+ if (logctx) {
+ char err[AV_ERROR_MAX_STRING_SIZE] = {0};
+ av_make_error_string(err, AV_ERROR_MAX_STRING_SIZE, ret);
+ av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", oldpath, newpath, err);
+ }
}
return ret;
}
OpenPOWER on IntegriCloud