summaryrefslogtreecommitdiffstats
path: root/examples/gstplay/player.c
diff options
context:
space:
mode:
authorJulien Moutte <julien@moutte.net>2003-12-14 17:31:07 +0000
committerJulien Moutte <julien@moutte.net>2003-12-14 17:31:07 +0000
commitb1547818e6e7c6dcc3bfa30d46fde3d2b881419d (patch)
treee4589ebe449ef68b7a1e2a77264d5795cc52937b /examples/gstplay/player.c
parent1fa87d33ffb204d41d9240552a5e1f925b6bf7c2 (diff)
downloadgst-plugins-bad-b1547818e6e7c6dcc3bfa30d46fde3d2b881419d.tar.gz
gst-plugins-bad-b1547818e6e7c6dcc3bfa30d46fde3d2b881419d.tar.bz2
gst-plugins-bad-b1547818e6e7c6dcc3bfa30d46fde3d2b881419d.zip
Fixing makefile. Smarter seek
Original commit message from CVS: Fixing makefile. Smarter seek
Diffstat (limited to 'examples/gstplay/player.c')
-rw-r--r--examples/gstplay/player.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/gstplay/player.c b/examples/gstplay/player.c
index 7e07c611..09811e63 100644
--- a/examples/gstplay/player.c
+++ b/examples/gstplay/player.c
@@ -20,6 +20,7 @@
#include <gst/play/gstplay.h>
static GMainLoop *loop = NULL;
+static gint64 length = 0;
static void
got_time_tick (GstPlay *play, gint64 time_nanos)
@@ -31,6 +32,7 @@ static void
got_stream_length (GstPlay *play, gint64 length_nanos)
{
g_message ("got length %llu", length_nanos);
+ length = length_nanos;
}
static void
@@ -48,7 +50,7 @@ got_eos (GstPlay *play)
static gboolean
seek_timer (GstPlay *play)
{
- gst_play_seek_to_time (play, 163439850000LL);
+ gst_play_seek_to_time (play, length / 2);
return FALSE;
}