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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/75/merge
Michael Niedermayer 10 years ago
parent 0d96d44c4f
commit af03ba9aa2
  1. 2
      libavformat/hdsenc.c

@ -322,8 +322,8 @@ static int hds_write_header(AVFormatContext *s)
AVOutputFormat *oformat; AVOutputFormat *oformat;
if (mkdir(s->filename, 0777) == -1 && errno != EEXIST) { 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); ret = AVERROR(errno);
av_log(s, AV_LOG_ERROR , "Failed to create directory %s\n", s->filename);
goto fail; goto fail;
} }

Loading…
Cancel
Save