Commit de0794a1 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

mciqtz32: Fix thread handle leak if a second play.

parent 43f23d3e
......@@ -449,11 +449,14 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
IVideoWindow_put_Visible(wma->vidwin, OATRUE);
if (!wma->thread)
{
wma->thread = CreateThread(NULL, 0, MCIQTZ_notifyThread, wma, 0, NULL);
if (!wma->thread) {
TRACE("Can't create thread\n");
return MCIERR_INTERNAL;
}
}
return 0;
}
......
......@@ -1336,6 +1336,19 @@ static void test_playWaveTypeMpegvideo(void)
err = mciSendStringA("close mysound", NULL, 0, NULL);
ok(!err,"mci close returned %s\n", dbg_mcierr(err));
/* test a second play */
err = mciSendStringA("open tempfile.wav type MPEGVideo alias mysound", NULL, 0, NULL);
ok(err==ok_saved,"mci open tempfile.wav type MPEGVideo returned %s\n", dbg_mcierr(err));
err = mciSendStringA("play mysound", NULL, 0, NULL);
ok(!err,"mci play retuend %s\n", dbg_mcierr(err));
err = mciSendStringA("play mysound", NULL, 0, NULL);
ok(!err,"mci play retuend %s\n", dbg_mcierr(err));
err = mciSendStringA("close mysound", NULL, 0, NULL);
ok(!err,"mci close returned %s\n", dbg_mcierr(err));
}
static void test_asyncWaveTypeMpegvideo(HWND hwnd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment