diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2018-05-17 21:34:31 -0400 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2018-05-17 21:39:29 -0400 |
commit | c40730fe93d0bd111c8e372cb324f870c50600a4 (patch) | |
tree | b360018959b0d211875d9ebb1b67b2dc8e1d2f84 /samples | |
parent | 936e5b8f32adaabc570881028070665a350db70a (diff) |
samples: Fix Tutorial4 by making it actually seek at some point.
Thanks to "tomislavtustonic" for the bug report and patch.
Also make the seek "Flushing" as the C tutorial.
https://bugzilla.gnome.org/show_bug.cgi?id=796184
Diffstat (limited to 'samples')
-rw-r--r-- | samples/BasicTutorial4.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/BasicTutorial4.cs b/samples/BasicTutorial4.cs index a1d5f59..814cced 100644 --- a/samples/BasicTutorial4.cs +++ b/samples/BasicTutorial4.cs @@ -66,11 +66,11 @@ namespace GstreamerSharp } // Print current position and total duration - Console.WriteLine ("Position {0} / {1}", new TimeSpan (current), new TimeSpan (duration)); + Console.Write("Position {0} / {1}\r", new TimeSpan (current), new TimeSpan (duration)); - if (seekEnabled && seekDone && current > 10L * Constants.SECOND) { - Console.WriteLine ("Readed 10s, performing seek..."); - playbin.SeekSimple (fmt, SeekFlags.KeyUnit, 30L * Constants.SECOND); + if (seekEnabled && !seekDone && current > 10L * Constants.SECOND) { + Console.WriteLine ("\nRead 10s, performing seek..."); + playbin.SeekSimple (fmt, SeekFlags.KeyUnit | SeekFlags.Flush, 30L * Constants.SECOND); seekDone = true; } } |