Merge pull request #8980 from alalek:fix_typo_8979_2.4

(2.4) highgui(macos): fix video file reading via AVFoundation
pull/9040/head
Alexander Alekhin 8 years ago committed by GitHub
commit 07b7c03efc
  1. 10
      modules/highgui/src/cap_avfoundation_mac.mm

@ -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];

Loading…
Cancel
Save