summaryrefslogtreecommitdiff
path: root/libavformat/hdsenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-25 13:20:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-25 13:28:51 +0200
commitaf03ba9aa205ed8b38146a85e4bf6396ac767b1d (patch)
treebf29f91c8d9c69642ed6e8b9919630151e4d0d9d /libavformat/hdsenc.c
parent0d96d44c4fa526582500718254ac9e19f984c6a5 (diff)
avformat/hdsenc: Read errno before av_log() as the callback from av_log() might affect errno
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/hdsenc.c')
-rw-r--r--libavformat/hdsenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index 98106f4b71..eec9bb8a6a 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;
}