summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-07-06 18:29:15 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-07-06 18:29:15 +0200
commit30f618e1ac0b0a41c2b5de7e9e10ac8ad55cd2dd (patch)
tree8806e5ab326bbf67f2a5690cd181cc28e4e9958f /src
parent4d23f8e4f62bb7b270aad0da489e5779d451aa45 (diff)
downloadfdk-aac-30f618e1ac0b0a41c2b5de7e9e10ac8ad55cd2dd.tar.gz
fdk-aac-30f618e1ac0b0a41c2b5de7e9e10ac8ad55cd2dd.tar.bz2
fdk-aac-30f618e1ac0b0a41c2b5de7e9e10ac8ad55cd2dd.zip
mot-encoder: only close directory if slideshow is active
Diffstat (limited to 'src')
-rw-r--r--src/mot-encoder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index 1a5ca1e..63b639c 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
{
int len, fidx, ret;
struct dirent *pDirent;
- DIR *pDir;
+ DIR *pDir = NULL;
int padlen = 58;
bool erase_after_tx = false;
int sleepdelay = 10;
@@ -318,7 +318,9 @@ int main(int argc, char *argv[])
sleep(sleepdelay);
- closedir(pDir);
+ if (pDir) {
+ closedir(pDir);
+ }
}
return 1;
}