Return NO in updateMP4FileWithAttributes:attributes:error: only if a serious error happened like a permission error or the mp4 not closing properly. Print the other errors to the log.

This commit is contained in:
Damiano Galassi committed 2014-12-14 09:23:18 +01:00
1 parent f0b349eef1
commit 017cd8d8c1
6 files changed
+155 -123

No files matched your search

+13 -9
View File
@@ -118,8 +118,13 @@ canOutput:
if (l->begin_time > begin_time)
end_time = MIN(end_time, l->begin_time);
if (l->begin_time <= begin_time)
[str appendString:l->line];
if (l->begin_time <= begin_time) {
// Try to be a bit smart and avoid duplicated lines
// from ssa.
if (!ssa || ![str containsString:l->line]) {
[str appendString:l->line];
}
}
}
for (i = 0; i < nlines; i++) {
@@ -186,6 +191,11 @@ canOutput:
forced = info;
}
-(void)setSSA:(BOOL)isSSA
{
ssa = isSSA;
}
-(NSString*)description
{
return [NSString stringWithFormat:@"lines left: %lu finished inputting: %d",(unsigned long)[lines count],finished];
@@ -958,13 +968,7 @@ NSString* removeNewLines(NSString* string) {
while ([mutableString length] && [mutableString characterAtIndex:[mutableString length] - 1] == '\n')
[mutableString deleteCharactersInRange:NSMakeRange([mutableString length] -1, 1)];
NSMutableString *mutableString2 = [NSMutableString stringWithString:mutableString];
NSUInteger replacedCount = [mutableString2 replaceOccurrencesOfString:@"\n" withString:@" " options:0 range:NSMakeRange(0,[mutableString2 length])];
if (replacedCount >= 2)
return mutableString2;
else
return mutableString;
return mutableString;
}
void createForcedAtom(u_int8_t* buffer) {