Re: [PATCH 1/5] quartz: Rather than assert, continue when IAsyncReader::WaitForNext is flushing and break when it actually times out.
Erich Hoover <ehoover(a)mines.edu> writes:
@@ -479,13 +488,27 @@ static void PullPin_Thread_Process(PullPin *This) else { /* FIXME: This is not well handled yet! */ - ERR("Processing error: %x\n", hr); if (hr == VFW_E_TIMEOUT) { - assert(!pSample); + struct timeval tve; + + /* + * Calculate the time elapsed in IAsyncReader::WaitForNext + * in order to determine whether a timeout actually occurred + * or whether the pin is flushing. + */ + timersub(&tv2, &tv1, &tve); + if (!timercmp(&tve, &tvw, <) && pSample != NULL) + { + ERR("Non-NULL sample returned with VFW_E_TIMEOUT.\n"); + break; + }
That's really ugly. Surely there's a better way to do this than measuring the elapsed time. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard