Commit 07b7c03e authored by Alexander Alekhin's avatar Alexander Alekhin Committed by GitHub

Merge pull request #8980 from alalek:fix_typo_8979_2.4

(2.4) highgui(macos): fix video file reading via AVFoundation
parents fa36e769 aae76212
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment