From 4c59329d978e372616e3c678ed3c6b91b863f133 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 11 Nov 2017 16:52:38 +0100 Subject: [PATCH] return false in decoder have no time Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/72579547e36fc23f78bfd127e680f91b40d4c8c2 Author: Jacek Jendrzej Date: 2017-11-11 (Sat, 11 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/playback_gst.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index 2afc737..2b8202d 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -815,12 +815,16 @@ bool cPlayback::GetPosition(int &position, int &duration) if (!GST_CLOCK_TIME_IS_VALID(pts)) { lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__); + return false; } } else { if(!gst_element_query_position(m_gst_playbin, fmt, &pts)) + { lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__); + return false; + } } position = pts / 1000000.0; // duration