Vnsi fixes, segfaults #108

Merged
merged 2 commits into from Dec 11, 2012
View
10 addons/pvr.vdr.vnsi/src/VNSIDemux.cpp
@@ -299,6 +299,11 @@ void cVNSIDemux::StreamChange(cResponsePacket *resp)
streams.stream[streams.iStreamCount].iCodecType = AVMEDIA_TYPE_SUBTITLE;
streams.stream[streams.iStreamCount].iCodecId = CODEC_ID_DVB_TELETEXT;
}
+ else
+ {
+ m_Streams.iStreamCount = 0;
+ return;
+ }
if (streams.stream[streams.iStreamCount].iCodecType == AVMEDIA_TYPE_AUDIO)
{
@@ -347,6 +352,11 @@ void cVNSIDemux::StreamChange(cResponsePacket *resp)
delete[] language;
}
+ else
+ {
+ m_Streams.iStreamCount = 0;
+ return;
+ }
delete[] type;
View
4 addons/pvr.vdr.vnsi/src/responsepacket.cpp
@@ -87,6 +87,8 @@ void cResponsePacket::extractHeader()
requestID = extract_U32();
userDataLength = extract_U32();
+
+ userData = NULL;
}
void cResponsePacket::extractStreamHeader()
@@ -104,6 +106,8 @@ void cResponsePacket::extractStreamHeader()
pts = extract_U64();
dts = extract_U64();
userDataLength = extract_U32();
+
+ userData = NULL;
}
bool cResponsePacket::end()