Fix MP42Mp4Importer to use the error from MP42File.

This commit is contained in:
Damiano Galassi committed 2016-07-22 09:53:43 +02:00
1 parent 742e1bf035
commit ed09e2425a
1 file changed
+6 -6
+6 -6
View File
@@ -39,13 +39,9 @@
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError;
{
if ((self = [super initWithURL:fileURL])) {
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL];
if(!sourceFile) {
if (outError) {
*outError = MP42Error(@"The movie could not be opened.", @"The file is not a mp4 file.", 100);
}
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL error:outError];
if (!sourceFile) {
[self release];
return nil;
}
@@ -83,6 +79,10 @@
const char *trackType = MP4GetTrackType(_fileHandle, srcTrackId);
const char *media_data_name = MP4GetTrackMediaDataName(_fileHandle, srcTrackId);
if (!trackType) {
return nil;
}
if (MP4_IS_AUDIO_TRACK_TYPE(trackType)){
if (!strcmp(media_data_name, "ac-3")) {