Cosmetics.

This commit is contained in:
Damiano Galassi committed 2014-03-11 19:48:28 +01:00
1 parent 1b17ce90b2
commit b29092a153
1 file changed
+7 -8
+7 -8
View File
@@ -48,8 +48,7 @@
unsigned int i = 1;
MP4Duration sum = 0;
while (i <= chapter_count)
{
while (i <= chapter_count) {
MP42TextSample *chapter = [[MP42TextSample alloc] init];
char *title = chapter_list[i-1].title;
@@ -57,8 +56,7 @@
chapter.title = [[[NSString alloc] initWithBytes:title
length:chapter_list[i-1].titleLength
encoding:NSUTF16StringEncoding] autorelease];
}
else {
} else {
chapter.title = [NSString stringWithCString:chapter_list[i-1].title encoding: NSUTF8StringEncoding];
}
@@ -225,9 +223,9 @@
MP42TextSample * nextChapter = [chapters objectAtIndex:i+1];
fileChapters[i].duration = nextChapter.timestamp - chapter.timestamp;
sum = nextChapter.timestamp;
}
else
} else {
fileChapters[i].duration = refTrackDuration - chapter.timestamp;
}
if (sum > refTrackDuration) {
fileChapters[i].duration = refTrackDuration - chapter.timestamp;
@@ -243,6 +241,7 @@
success = _Id = findChapterTrackId(fileHandle);
}
}
if (!success) {
if (outError != NULL)
*outError = MP42Error(@"Failed to mux chapters into mp4 file",
@@ -250,9 +249,9 @@
120);
return success;
}
else if (_Id)
} else if (_Id) {
success = [super writeToFile:fileHandle error:outError];
}
return success;
}