1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #8980 from alalek:fix_typo_8979_2.4

(2.4) highgui(macos): fix video file reading via AVFoundation
This commit is contained in:
Alexander Alekhin
2017-06-24 11:38:32 +03:00
committed by GitHub
+5 -5
View File
@@ -697,12 +697,12 @@ CvCaptureFile::CvCaptureFile(const char* filename) {
return;
}
NSArray *tracks = [mAsset tracksWithMediaType:AVMediaTypeAudio];
NSArray *tracks = [mAsset tracksWithMediaType:AVMediaTypeVideo];
if ([tracks count] == 0) {
fprintf(stderr, "OpenCV: Couldn't read movie file \"%s\"\n", filename);
[localpool drain];
started = 0;
return;
fprintf(stderr, "OpenCV: Couldn't read video stream from file \"%s\"\n", filename);
[localpool drain];
started = 0;
return;
}
mAssetTrack = [tracks[0] retain];