Commit af03ba9a authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0d96d44c
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment