summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-06-20 15:35:26 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-06-20 15:35:26 +0200
commitcf325a27769a3e01aecf726ef42d67ac15f1614c (patch)
tree62fd508112850d811cc9626b1c6d34d7646daa31 /src
parent32068fb8bdc602b5835dbe4e507e34150395a9f8 (diff)
downloadfdk-aac-cf325a27769a3e01aecf726ef42d67ac15f1614c.tar.gz
fdk-aac-cf325a27769a3e01aecf726ef42d67ac15f1614c.tar.bz2
fdk-aac-cf325a27769a3e01aecf726ef42d67ac15f1614c.zip
Add check for readdir for DT_UNKNOWN
Diffstat (limited to 'src')
-rw-r--r--src/mot-encoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index e227412..cc451e6 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
while(1) {
pDir = opendir(dir);
if (pDir == NULL) {
- printf ("Cannot open directory '%s'\n", dir);
+ fprintf(stderr, "Cannot open directory '%s'\n", dir);
return 1;
}
if (fidx == 9999) {
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
}
while ((pDirent = readdir(pDir)) != NULL) {
- if (pDirent->d_name[0] != '.') {
+ if (pDirent->d_type != DT_UNKNOWN && pDirent->d_name[0] != '.') {
sprintf(imagepath, "%s/%s", dir, pDirent->d_name);
ret = encodeFile(output_fd, imagepath, fidx, padlen);
if (ret != 1) {