Skip to content

Commit aae7621

Browse files
committed
highgui(macos): fix video file reading via AVFoundation
1 parent fa36e76 commit aae7621

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/highgui/src/cap_avfoundation_mac.mm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -697,12 +697,12 @@ -(int) updateImage {
697697
return;
698698
}
699699

700-
NSArray *tracks = [mAsset tracksWithMediaType:AVMediaTypeAudio];
700+
NSArray *tracks = [mAsset tracksWithMediaType:AVMediaTypeVideo];
701701
if ([tracks count] == 0) {
702-
fprintf(stderr, "OpenCV: Couldn't read movie file \"%s\"\n", filename);
703-
[localpool drain];
704-
started = 0;
705-
return;
702+
fprintf(stderr, "OpenCV: Couldn't read video stream from file \"%s\"\n", filename);
703+
[localpool drain];
704+
started = 0;
705+
return;
706706
}
707707

708708
mAssetTrack = [tracks[0] retain];

0 commit comments

Comments
 (0)