[FFmpeg-cvslog] avformat/hdsenc: Read errno before av_log() as the callback from av_log() might affect errno

Michael Niedermayer git at videolan.org
Sat Oct 25 13:40:05 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 25 13:20:23 2014 +0200| [af03ba9aa205ed8b38146a85e4bf6396ac767b1d] | committer: Michael Niedermayer

avformat/hdsenc: Read errno before av_log() as the callback from av_log() might affect errno

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af03ba9aa205ed8b38146a85e4bf6396ac767b1d
---

 libavformat/hdsenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index 98106f4..eec9bb8 100644
--- a/libavformat/hdsenc.c
+++ b/libavformat/hdsenc.c
@@ -322,8 +322,8 @@ static int hds_write_header(AVFormatContext *s)
     AVOutputFormat *oformat;
 
     if (mkdir(s->filename, 0777) == -1 && errno != EEXIST) {
-        av_log(s, AV_LOG_ERROR , "Failed to create directory %s\n", s->filename);
         ret = AVERROR(errno);
+        av_log(s, AV_LOG_ERROR , "Failed to create directory %s\n", s->filename);
         goto fail;
     }
 



More information about the ffmpeg-cvslog mailing list