mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
try to fix freeze with subtitle file , use gst_element_get_state only if need
Origin commit data
------------------
Branch: master
Commit: 2864b81fe2
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-11-11 (Sat, 11 Nov 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -841,21 +841,23 @@ bool cPlayback::SetPosition(int position, bool absolute)
|
|||||||
{
|
{
|
||||||
lt_info("%s: pos %d abs %d playing %d\n", __func__, position, absolute, playing);
|
lt_info("%s: pos %d abs %d playing %d\n", __func__, position, absolute, playing);
|
||||||
|
|
||||||
gint64 time_nanoseconds;
|
|
||||||
gint64 pos;
|
|
||||||
GstFormat fmt = GST_FORMAT_TIME;
|
|
||||||
GstState state;
|
|
||||||
|
|
||||||
if(m_gst_playbin)
|
if(m_gst_playbin)
|
||||||
{
|
{
|
||||||
|
if(first){
|
||||||
|
GstState state;
|
||||||
gst_element_get_state(m_gst_playbin, &state, NULL, GST_CLOCK_TIME_NONE);
|
gst_element_get_state(m_gst_playbin, &state, NULL, GST_CLOCK_TIME_NONE);
|
||||||
|
|
||||||
if ( (state == GST_STATE_PAUSED) && first)
|
if ( (state == GST_STATE_PAUSED) && first)
|
||||||
{
|
{
|
||||||
init_jump = position;
|
init_jump = position;
|
||||||
first = false;
|
first = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gint64 time_nanoseconds;
|
||||||
|
gint64 pos;
|
||||||
|
GstFormat fmt = GST_FORMAT_TIME;
|
||||||
if (!absolute)
|
if (!absolute)
|
||||||
{
|
{
|
||||||
gst_element_query_position(m_gst_playbin, fmt, &pos);
|
gst_element_query_position(m_gst_playbin, fmt, &pos);
|
||||||
|
Reference in New Issue
Block a user