avformat/internal: log underlying error with ff_rename failure

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
pull/274/head
Aman Gupta 7 years ago
parent 5f4a32a6e3
commit 4c78bbd313
  1. 2
      libavformat/internal.h

@ -542,7 +542,7 @@ static inline int ff_rename(const char *oldpath, const char *newpath, void *logc
if (rename(oldpath, newpath) == -1) {
ret = AVERROR(errno);
if (logctx)
av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s\n", oldpath, newpath);
av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", oldpath, newpath, av_err2str(ret));
}
return ret;
}

Loading…
Cancel
Save