diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-21 19:53:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-21 19:53:18 +0200 |
commit | ebea370dc3909aa182bae4c728b83516a904beca (patch) | |
tree | e77493662da37dff4b7b1ec649018a2c935ddd74 /tools/ismindex.c | |
parent | bc7330a84029841dc0118e1a0d02ae26773c4412 (diff) | |
download | ffmpeg-ebea370dc3909aa182bae4c728b83516a904beca.tar.gz |
ismindex: check mkdir()s return code
Fixes CID733724
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools/ismindex.c')
-rw-r--r-- | tools/ismindex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/ismindex.c b/tools/ismindex.c index 46333680fa..67a1927379 100644 --- a/tools/ismindex.c +++ b/tools/ismindex.c @@ -132,7 +132,8 @@ static int write_fragments(struct Tracks *tracks, int start_index, struct Track *track = tracks->tracks[i]; const char *type = track->is_video ? "video" : "audio"; snprintf(dirname, sizeof(dirname), "QualityLevels(%d)", track->bitrate); - mkdir(dirname, 0777); + if (mkdir(dirname, 0777) == -1) + return AVERROR(errno); for (j = 0; j < track->chunks; j++) { snprintf(filename, sizeof(filename), "%s/Fragments(%s=%"PRId64")", dirname, type, track->offsets[j].time); |