1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

highgui(macos): fix video file reading via AVFoundation

This commit is contained in:
Alexander Alekhin
2017-06-24 11:01:33 +03:00
parent fa36e769cf
commit aae7621243
+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];