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; }