[longomatch] Fix current time query using the video sinks
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix current time query using the video sinks
- Date: Wed, 5 Nov 2014 19:02:42 +0000 (UTC)
commit 52dcd65cdeb35ece5754f59a24c6fbbff8088ce0
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Nov 3 16:54:51 2014 +0100
Fix current time query using the video sinks
The audio sink can have an offset with respect to the video
sink, which results in the current time not matching the
the one of the last frame displayed in the video sink
libcesarplayer/lgm-video-player.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libcesarplayer/lgm-video-player.c b/libcesarplayer/lgm-video-player.c
index 6e8a7fb..0d4b208 100644
--- a/libcesarplayer/lgm-video-player.c
+++ b/libcesarplayer/lgm-video-player.c
@@ -286,7 +286,7 @@ lgm_query_timeout (LgmVideoPlayer * lvp)
GST_INFO ("could not get duration");
}
- if (gst_element_query_position (lvp->priv->play, &fmt, &pos)) {
+ if (gst_element_query_position (lvp->priv->video_sink, &fmt, &pos)) {
if (pos != -1 && fmt == GST_FORMAT_TIME) {
got_time_tick (GST_ELEMENT (lvp->priv->play), pos, lvp);
}
@@ -755,7 +755,7 @@ lgm_video_player_get_current_time (LgmVideoPlayer * lvp)
fmt = GST_FORMAT_TIME;
pos = -1;
- gst_element_query_position (lvp->priv->play, &fmt, &pos);
+ gst_element_query_position (lvp->priv->video_sink, &fmt, &pos);
return pos != -1 ? pos : lvp->priv->current_time;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]