From 7c4935a1c94a5a70a1e5333311bc9f83650909d2 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 24 Oct 2017 15:57:30 +0200 Subject: [PATCH] fix get play position --- libarmbox/playback_gst.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index 71275f3..5cc1690 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -806,13 +806,10 @@ bool cPlayback::GetPosition(int &position, int &duration) if (audioSink || videoSink) { g_signal_emit_by_name(audioSink ? audioSink : videoSink, "get-decoder-time", &pts); - if (!GST_CLOCK_TIME_IS_VALID(pts)) - { + if (!GST_CLOCK_TIME_IS_VALID(pts)){ lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__); } - } - else - { + }else{ if(!gst_element_query_position(m_gst_playbin, fmt, &pts)) lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__); }