Fix MP42Mp4Importer to use the error from MP42File.
This commit is contained in:
1 parent
742e1bf035
commit
ed09e2425a
1 file changed
+6
-6
@@ -39,13 +39,9 @@
|
|||||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError;
|
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError;
|
||||||
{
|
{
|
||||||
if ((self = [super initWithURL:fileURL])) {
|
if ((self = [super initWithURL:fileURL])) {
|
||||||
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL];
|
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL error:outError];
|
||||||
|
|
||||||
if(!sourceFile) {
|
|
||||||
if (outError) {
|
|
||||||
*outError = MP42Error(@"The movie could not be opened.", @"The file is not a mp4 file.", 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!sourceFile) {
|
||||||
[self release];
|
[self release];
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
@@ -83,6 +79,10 @@
|
|||||||
const char *trackType = MP4GetTrackType(_fileHandle, srcTrackId);
|
const char *trackType = MP4GetTrackType(_fileHandle, srcTrackId);
|
||||||
const char *media_data_name = MP4GetTrackMediaDataName(_fileHandle, srcTrackId);
|
const char *media_data_name = MP4GetTrackMediaDataName(_fileHandle, srcTrackId);
|
||||||
|
|
||||||
|
if (!trackType) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
if (MP4_IS_AUDIO_TRACK_TYPE(trackType)){
|
if (MP4_IS_AUDIO_TRACK_TYPE(trackType)){
|
||||||
|
|
||||||
if (!strcmp(media_data_name, "ac-3")) {
|
if (!strcmp(media_data_name, "ac-3")) {
|
||||||
|
|||||||
Reference in new issue
Block a user