[longomatch] Disconnect all signals when closing the player



commit c625045c519464b9c21a5a3ce8c94e82d8be6e81
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Sep 5 00:52:54 2014 +0200

    Disconnect all signals when closing the player

 LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
index 6e53e6e..49f298a 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
@@ -100,9 +100,7 @@ namespace LongoMatch.Gui
                #endregion
                protected override void OnDestroyed ()
                {
-                       ReconfigureTimeout (0);
-                       player.Dispose ();
-                       blackboard.Dispose ();
+                       Close ();
                        base.OnDestroyed ();
                }
                #region Properties
@@ -236,11 +234,13 @@ namespace LongoMatch.Gui
 
                public void Close ()
                {
+                       player.Error -= OnError;
+                       player.StateChange -= OnStateChanged;
+                       player.Eos -= OnEndOfStream;
+                       player.ReadyToSeek -= OnReadyToSeek;
                        ReconfigureTimeout (0);
-                       player.Close ();
-                       file = null;
-                       timescale.Value = 0;
-                       UnSensitive ();
+                       player.Dispose ();
+                       blackboard.Dispose ();
                }
 
                public void Seek (Time time, bool accurate)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]