Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
vnsi: only consider video and audio streams for playing time
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Dec 21, 2014
1 parent 89ba5bb commit d1538eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addons/pvr.vdr.vnsi/addon/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.vdr.vnsi"
version="1.9.22"
version="1.9.23"
name="VDR VNSI Client"
provider-name="FernetMenta, Team XBMC">
<requires>
Expand Down
18 changes: 13 additions & 5 deletions addons/pvr.vdr.vnsi/src/VNSIDemux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ DemuxPacket* cVNSIDemux::Read()
else if (resp->getOpCodeID() == VNSI_STREAM_MUXPKT)
{
// figure out the stream id for this packet
int iStreamId = m_streams.GetStreamId(resp->getStreamID());
int pid = resp->getStreamID();
int iStreamId = m_streams.GetStreamId(pid);

// stream found ?
if(iStreamId != -1 && resp->getMuxSerial() == m_MuxPacketSerial)
Expand All @@ -122,10 +123,17 @@ DemuxPacket* cVNSIDemux::Read()
p->iStreamId = iStreamId;
delete resp;

if (p->dts != DVD_NOPTS_VALUE)
m_CurrentDTS = p->dts;
else if (p->pts != DVD_NOPTS_VALUE)
m_CurrentDTS = p->pts;
XbmcPvrStream *stream = m_streams.GetStreamById(pid);
xbmc_codec_type_t type = XBMC_CODEC_TYPE_UNKNOWN;
if (stream != NULL)
type = stream->iCodecType;
if (type == XBMC_CODEC_TYPE_VIDEO || type == XBMC_CODEC_TYPE_AUDIO)
{
if (p->dts != DVD_NOPTS_VALUE)
m_CurrentDTS = p->dts;
else if (p->pts != DVD_NOPTS_VALUE)
m_CurrentDTS = p->pts;
}
return p;
}
else if (iStreamId != -1 && resp->getMuxSerial() != m_MuxPacketSerial)
Expand Down

3 comments on commit d1538eb

@fritsch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FernetMenta: Is it okay to PR that to helix branch?

@FernetMenta
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though it would have been applied already. this is highly demanded by i.e. OE users.

@fritsch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not - I PRd it manually: OpenELEC/OpenELEC.tv#3907

@negge You are doing the Helix PVR addons? Can you please pick that?

Please sign in to comment.