[longomatch] Fix infinit loop trying to get a frame at the segment stop time
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [longomatch] Fix infinit loop trying to get a frame at the segment stop time
- Date: Mon, 4 Jan 2010 01:19:30 +0000 (UTC)
commit 42dc14f2bb91d27bb6e3e9a54563a4262d64bd77
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Dec 29 20:01:54 2009 +0100
Fix infinit loop trying to get a frame at the segment stop time
CesarPlayer/Gui/PlayerBin.cs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/CesarPlayer/Gui/PlayerBin.cs b/CesarPlayer/Gui/PlayerBin.cs
index 0edc86d..a62e1e3 100644
--- a/CesarPlayer/Gui/PlayerBin.cs
+++ b/CesarPlayer/Gui/PlayerBin.cs
@@ -531,8 +531,16 @@ namespace LongoMatch.Gui
{
int currentTime;
Pixbuf frame=null;
+
+ currentTime = (int)AccurateCurrentTime;
+ // If the player has reached the end of the segment the current time
+ // will be unseekable and it's not possible to get a frame at this
+ // instant. If we exceed the segment stop time, decrease in a
+ // milisecond the position.
+ if (InSegment() && currentTime >= segmentStopTime)
+ currentTime -= 1;
if (DrawFrame != null)
- DrawFrame((int)AccurateCurrentTime);
+ DrawFrame(currentTime);
}
#endregion
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]