avformat/internal: log underlying error with ff_rename failure
authorAman Gupta <aman@tmm1.net>
Fri, 22 Dec 2017 23:17:15 +0000 (15:17 -0800)
committerAman Gupta <aman@tmm1.net>
Sat, 23 Dec 2017 02:00:47 +0000 (18:00 -0800)
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
libavformat/internal.h

index 36a5721..de4b784 100644 (file)
@@ -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;
 }