[PATCH] qcap: Fix always wait for ReadThread to end when fiter_Stop.

Zebediah Figura z.figura12 at gmail.com
Sun Jun 28 18:16:13 CDT 2020


On 6/28/20 1:07 AM, Jiajin Cui wrote:
> There is a very small probability that the ReadThread will always wait for run_event signal after filet_Stop calls qcap_driver_stop_stream, and then filter_Stop is stuck waiting for the ReadThread to exit when calling qcap_driver_cleanup_stream. This issue was found in the video call hang up of Tencent QQ application.
> 
> Signed-off-by: Jiajin Cui <cuijiajin at uniontech.com>
> ---
>  dlls/qcap/v4l.c | 1 +
>  1 file changed, 1 insertion(+)
> 

While this certainly works, I don't particularly like the code
organization (it's kind of existentially weird that cleanup_stream()
sets "run_event".) After playing with this for a while I came up with a
different solution that uses a condition variable, and should also fix
this hang. I've sent that to the mailing list; please let me know
whether it fixes your problem.



More information about the wine-devel mailing list