From 8791aa4fbc68ed1216a1164c819165092dd418d9 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Wed, 25 Jan 2006 18:07:02 +0000 Subject: [PATCH] libs/gst/base/gstbasesink.c: We only query position using the clock in the playing state. Original commit message from CVS: 2006-01-25 Julien MOUTTE * libs/gst/base/gstbasesink.c: (gst_base_sink_get_position): We only query position using the clock in the playing state. Query peer in the other cases. * win32/common/config.h: Updates. --- ChangeLog | 7 +++++++ libs/gst/base/gstbasesink.c | 8 ++++++++ win32/common/config.h | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2ef7f15..c910f0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-01-25 Julien MOUTTE + + * libs/gst/base/gstbasesink.c: (gst_base_sink_get_position): + We only query position using the clock in the playing state. + Query peer in the other cases. + * win32/common/config.h: Updates. + 2006-01-24 Wim Taymans * gst/gstsystemclock.c: (gst_system_clock_id_wait_unlocked): diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 8e7d1f6..78b309f 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1421,6 +1421,13 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format, { /* we can answer time format */ GST_OBJECT_LOCK (basesink); + + /* We get position from clock only in PLAYING */ + if (GST_STATE (basesink) != GST_STATE_PLAYING) { + GST_OBJECT_UNLOCK (basesink); + goto beach; + } + if ((clock = GST_ELEMENT_CLOCK (basesink))) { GstClockTime now, base; gint64 time; @@ -1459,6 +1466,7 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format, default: break; } +beach: return res; } diff --git a/win32/common/config.h b/win32/common/config.h index 63ffd35..c9480f3 100644 --- a/win32/common/config.h +++ b/win32/common/config.h @@ -39,7 +39,7 @@ #define GST_MAJORMINOR "0.10" /* Define host CPU */ -#define HOST_CPU "x86_64" +#define HOST_CPU "i686" /* Define if the host CPU is an Alpha */ #undef HAVE_CPU_ALPHA -- 2.7.4