summaryrefslogtreecommitdiff
path: root/libavformat/hdsenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-08 00:38:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-08 00:39:26 +0200
commitaecd064744c846faf7c7df76d0ecca720f314e52 (patch)
tree587943e9f458bf8545c7ddb5a3e46b6bcb51a09c /libavformat/hdsenc.c
parent5e7524195c6a69e887c28976304db70e94d9eea4 (diff)
parent803e82276b3716bf6012ec69e8854dae14a4fd2b (diff)
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/hdsenc.c')
-rw-r--r--libavformat/hdsenc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index fac5bcf417..1f77785f95 100644
--- a/libavformat/hdsenc.c
+++ b/libavformat/hdsenc.c
@@ -329,13 +329,10 @@ static int hds_write_header(AVFormatContext *s)
int ret = 0, i;
AVOutputFormat *oformat;
- if (mkdir(s->filename, 0777)) {
- int is_error = errno != EEXIST;
- av_log(s, is_error ? AV_LOG_ERROR : AV_LOG_VERBOSE, "Failed to create directory %s\n", s->filename);
- if (is_error) {
- ret = AVERROR(errno);
- goto fail;
- }
+ 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);
+ goto fail;
}
oformat = av_guess_format("flv", NULL, NULL);