mciavi: Fix player deadlock when starting to play.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Thu Nov 8 03:51:08 CST 2012


Hi,

this fixes bugs 21060 and 15669.

The broken pattern in mciPlay of old mcidrivers is to perform some checks,
possibly update the status to MODE_PLAY, then fork and re-enter mciPlay.

I've separated the initial checks from the actual playing and state change,
removing the bug.  I already did the same in the mcimidi driver.

I've tried to maintain the spirit of the old code, incl. the broken series of LeaveCS/EnterCS.

Subtle changes:
 - ShowWindow only after the new position is set, s.t. hopefully the new frame is drawn.
 - play from 0 to 0 no more exits immediately.
   Only the player will exit after checking bounds, which may happen after mciPlay returned.
   I changed this based on experience with mciwave where occasional test failures show that
   the player does not exit immediately with state MODE_STOP.

Non-changes:
 - ShowWindow in app thread. Perhaps this should be moved to the player thread,
but then I'm not familiar with the MS message loop and don't want to introduce an
unwarranted change.
 - play from 1000 to 500 still does not return OUTOFRANGE.
 - several bugs and incompatibilities with native.

Regards,
 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mciavi-Fix-player-deadlock-when-starting-to-play.patch
Type: application/octet-stream
Size: 11791 bytes
Desc: 0001-mciavi-Fix-player-deadlock-when-starting-to-play.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121108/10228db4/attachment.obj>


More information about the wine-patches mailing list