diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 08804993b62..4e19b710026 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -110,7 +110,7 @@ struct _Capture IPin *pOut; int fd, mmap; - int iscommitted, stopped; + BOOL iscommitted, stopped; struct video_picture pict; int dbrightness, dhue, dcolour, dcontrast; @@ -661,7 +661,8 @@ cfail: LeaveCriticalSection(&capBox->CritSect); fail: - capBox->thread = 0; capBox->stopped = 1; + capBox->thread = 0; + capBox->stopped = TRUE; FIXME("Stop IFilterGraph\n"); return 0; } @@ -677,16 +678,18 @@ HRESULT qcap_driver_run(Capture *capBox, FILTER_STATE *state) EnterCriticalSection(&capBox->CritSect); - capBox->stopped = 0; + capBox->stopped = FALSE; if (*state == State_Stopped) { *state = State_Running; - if (!capBox->iscommitted++) + if (!capBox->iscommitted) { ALLOCATOR_PROPERTIES ap, actual; BaseOutputPin *out; + capBox->iscommitted = TRUE; + ap.cBuffers = 3; if (!capBox->swresize) ap.cbBuffer = capBox->width * capBox->height; @@ -755,14 +758,14 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) { if (*state == State_Paused) ResumeThread(capBox->thread); - capBox->stopped = 1; + capBox->stopped = TRUE; capBox->thread = 0; if (capBox->iscommitted) { BaseOutputPin *out; HRESULT hr; - capBox->iscommitted = 0; + capBox->iscommitted = FALSE; out = (BaseOutputPin*)capBox->pOut; @@ -894,9 +897,9 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card ) capBox->bitDepth = 24; capBox->pOut = pOut; capBox->fps = 3; - capBox->stopped = 0; + capBox->stopped = FALSE; capBox->curframe = 0; - capBox->iscommitted = 0; + capBox->iscommitted = FALSE; TRACE("format: %d bits - %d x %d\n", capBox->bitDepth, capBox->width, capBox->height); diff --git a/dlls/qcap/yuv.c b/dlls/qcap/yuv.c index 6b8ff29f9bf..7e17add949c 100644 --- a/dlls/qcap/yuv.c +++ b/dlls/qcap/yuv.c @@ -41,7 +41,7 @@ static int yuv_gu[256]; /* Green U */ static int yuv_bu[256]; /* Blue U */ static int yuv_rv[256]; /* Red V */ static int yuv_gv[256]; /* Green V */ -static int initialised = 0; +static BOOL initialised = FALSE; static inline int ValidRange(int in) { if (in > 255) in = 255; @@ -67,7 +67,8 @@ void YUV_Init(void) { float y, u, v; int y_, cb, cr; - if (initialised++) return; + if (initialised) return; + initialised = TRUE; for (y_ = 0; y_ <= 255; y_++) {