mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-06-07 11:34:07 +02:00
Fix a video player crash caused by not handling remote commands on UI thread
This commit is contained in:
parent
f909b887d9
commit
b290c94635
@ -75,6 +75,7 @@ private void FormPlayer_Load(object sender, EventArgs e){
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void pipe_DataIn(object sender, DuplexPipe.PipeReadEventArgs e){
|
private void pipe_DataIn(object sender, DuplexPipe.PipeReadEventArgs e){
|
||||||
|
Invoke(new Action(() => {
|
||||||
switch(e.Key){
|
switch(e.Key){
|
||||||
case "key":
|
case "key":
|
||||||
HandleKey((Keys)int.Parse(e.Data, NumberStyles.Integer));
|
HandleKey((Keys)int.Parse(e.Data, NumberStyles.Integer));
|
||||||
@ -84,6 +85,7 @@ private void pipe_DataIn(object sender, DuplexPipe.PipeReadEventArgs e){
|
|||||||
StopVideo();
|
StopVideo();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void player_PlayStateChange(int newState){
|
private void player_PlayStateChange(int newState){
|
||||||
|
Loading…
Reference in New Issue
Block a user