Skip to content

Commit

Permalink
Forgotten issue by previous patch serviceMP3.
Browse files Browse the repository at this point in the history
 The new way of works also needed another way for position keeping.
 Now position for audio only does work back ok.
 By codecs using the mpeg unpack and who have a missing pts on the video
 will now also have a position keeping.

	modified:   lib/service/servicemp3.cpp
  • Loading branch information
christophecvr committed Jan 28, 2017
1 parent 46b154a commit bf3e0ae
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/service/servicemp3.cpp
Expand Up @@ -1292,8 +1292,20 @@ RESULT eServiceMP3::getPlayPosition(pts_t &pts)
#else
if ((dvb_audiosink || dvb_videosink) && !m_paused)
{
g_signal_emit_by_name(dvb_videosink ? dvb_videosink : dvb_audiosink, "get-decoder-time", &pos);
if (!GST_CLOCK_TIME_IS_VALID(pos)) return -1;
if (m_sourceinfo.is_audio)
{
g_signal_emit_by_name(dvb_audiosink, "get-decoder-time", &pos);
if(!GST_CLOCK_TIME_IS_VALID(pos))
return -1;
}
else
{
g_signal_emit_by_name(dvb_videosink, "get-decoder-time", &pos);
if (!GST_CLOCK_TIME_IS_VALID(pos) || 0)
g_signal_emit_by_name(dvb_audiosink, "get-decoder-time", &pos);
if(!GST_CLOCK_TIME_IS_VALID(pos))
return -1;
}
}
#endif
else
Expand Down Expand Up @@ -1865,6 +1877,7 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
switch (GST_MESSAGE_TYPE (msg))
{
case GST_MESSAGE_EOS:
eDebug("[eServiceMP3] ** EOS RECEIVED **");
m_event((iPlayableService*)this, evEOF);
break;
case GST_MESSAGE_STATE_CHANGED:
Expand Down

0 comments on commit bf3e0ae

Please sign in to comment.