1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-10-25 13:20:23 +02:00
parent 0d96d44c4f
commit af03ba9aa2

View File

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