diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-08 00:38:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-08 00:39:26 +0200 |
commit | aecd064744c846faf7c7df76d0ecca720f314e52 (patch) | |
tree | 587943e9f458bf8545c7ddb5a3e46b6bcb51a09c /libavformat/smoothstreamingenc.c | |
parent | 5e7524195c6a69e887c28976304db70e94d9eea4 (diff) | |
parent | 803e82276b3716bf6012ec69e8854dae14a4fd2b (diff) | |
download | ffmpeg-aecd064744c846faf7c7df76d0ecca720f314e52.tar.gz |
Merge commit '803e82276b3716bf6012ec69e8854dae14a4fd2b'
* commit '803e82276b3716bf6012ec69e8854dae14a4fd2b':
libavformat: Check mkdir return error codes
Conflicts:
libavformat/hdsenc.c
libavformat/smoothstreamingenc.c
See: c89f8f80cc83622471eaf99e451e78df68475e19
See: a3886ea3c5947ca05bfe01b053d9ce2f9725d9eb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/smoothstreamingenc.c')
-rw-r--r-- | libavformat/smoothstreamingenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index 0781a0a370..d2b7c9e924 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -292,7 +292,7 @@ static int ism_write_header(AVFormatContext *s) int ret = 0, i; AVOutputFormat *oformat; - if (mkdir(s->filename, 0777) < 0) { + if (mkdir(s->filename, 0777) == -1 && errno != EEXIST) { av_log(s, AV_LOG_ERROR, "mkdir failed\n"); ret = AVERROR(errno); goto fail; @@ -322,7 +322,7 @@ static int ism_write_header(AVFormatContext *s) goto fail; } snprintf(os->dirname, sizeof(os->dirname), "%s/QualityLevels(%d)", s->filename, s->streams[i]->codec->bit_rate); - if (mkdir(os->dirname, 0777) < 0) { + if (mkdir(os->dirname, 0777) == -1 && errno != EEXIST) { ret = AVERROR(errno); av_log(s, AV_LOG_ERROR, "mkdir failed\n"); goto fail; |