mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-08-21 03:54:07 +02:00
Fix a video player crash caused by not handling remote commands on UI thread
This commit is contained in:
@@ -75,15 +75,17 @@ namespace TweetDuck.Video{
|
||||
}
|
||||
|
||||
private void pipe_DataIn(object sender, DuplexPipe.PipeReadEventArgs e){
|
||||
switch(e.Key){
|
||||
case "key":
|
||||
HandleKey((Keys)int.Parse(e.Data, NumberStyles.Integer));
|
||||
break;
|
||||
Invoke(new Action(() => {
|
||||
switch(e.Key){
|
||||
case "key":
|
||||
HandleKey((Keys)int.Parse(e.Data, NumberStyles.Integer));
|
||||
break;
|
||||
|
||||
case "die":
|
||||
StopVideo();
|
||||
break;
|
||||
}
|
||||
case "die":
|
||||
StopVideo();
|
||||
break;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private void player_PlayStateChange(int newState){
|
||||
|
Reference in New Issue
Block a user