[PATCH 1/5] quartz: Rather than assert, continue when IAsyncReader::WaitForNext is flushing and break when it actually times out.
Alexandre Julliard
julliard at winehq.org
Wed Jul 20 05:45:17 CDT 2011
Erich Hoover <ehoover at 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 at winehq.org
More information about the wine-devel
mailing list