dshow: fixed CS initialization

This commit is contained in:
Martin Pulec
2013-11-12 17:15:08 +01:00
parent 44e364080f
commit 80c254fa4f

View File

@@ -661,6 +661,9 @@ void * vidcap_dshow_init(char *init_fmt, unsigned int flags) {
return NULL;
}
InitializeConditionVariable(&s->grabWaitCV);
InitializeCriticalSection(&s->returnBufferCS);
if (init_fmt && strcmp(init_fmt, "help") == 0) {
show_help(s);
cleanup(s);
@@ -675,8 +678,6 @@ void * vidcap_dshow_init(char *init_fmt, unsigned int flags) {
if (!process_args(s, init_fmt)) goto error;
}
InitializeConditionVariable(&s->grabWaitCV);
// Select video capture device
if (s->deviceNumber != -1) { // Device was specified by number
for (int i = 1; i <= s->deviceNumber; i++) {