Revert "return false in decoder have no time"

This reverts commit e2c368551f.


Origin commit data
------------------
Branch: master
Commit: dcce5347b1
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-11-12 (Sun, 12 Nov 2017)



------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2017-11-12 08:57:41 +01:00
parent 27d19964ef
commit dd82784cb4

View File

@@ -820,13 +820,10 @@ bool cPlayback::GetPosition(int &position, int &duration)
g_signal_emit_by_name(audioSink ? audioSink : videoSink, "get-decoder-time", &pts); 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__); lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
return false;
} }
}else{ }else{
if(!gst_element_query_position(m_gst_playbin, fmt, &pts)){ if(!gst_element_query_position(m_gst_playbin, fmt, &pts))
lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__); lt_info( "%s - %d failed\n", __FUNCTION__, __LINE__);
return false;
}
} }
position = pts / 1000000.0; position = pts / 1000000.0;
// duration // duration