From 6a0a6c15c0393e837857b4e13fbe3518d2c2b2d5 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 25 Feb 2006 10:21:29 +0100 Subject: [PATCH] Fixed the 'libsi' function CharArray::checkSize(), which made a previous workaround in libsi/descriptor.c obsolete --- HISTORY | 4 +++- libsi/descriptor.c | 6 +----- libsi/util.h | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/HISTORY b/HISTORY index 8c3c8a69..03b70bea 100644 --- a/HISTORY +++ b/HISTORY @@ -4360,10 +4360,12 @@ Video Disk Recorder Revision History - Added a comment to tChannelID::nid, explaining that is is actually the "original" network id. -2006-02-24: Version 1.3.44 +2006-02-25: Version 1.3.44 - Fixed setting the audio language codes in 'Transfer-Mode' (reported by Rolf Ahrenberg). The actual problem was the call to the Transferring() function in cDevice::AttachPlayer() before assigning the player. - Fixed removing the '-' when entering a channel number where there is no other one that fits the input (thanks to Joachim Wilke). +- Fixed the 'libsi' function CharArray::checkSize(), which made a previous workaround + in libsi/descriptor.c obsolete (thanks to Marcel Wiesweg). diff --git a/libsi/descriptor.c b/libsi/descriptor.c index 6a3af9fe..b84e2c44 100644 --- a/libsi/descriptor.c +++ b/libsi/descriptor.c @@ -6,7 +6,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: descriptor.c 1.17 2006/02/18 11:02:25 kls Exp $ + * $Id: descriptor.c 1.18 2006/02/25 10:06:05 kls Exp $ * * ***************************************************************************/ @@ -331,8 +331,6 @@ void CaDescriptor::Parse() { data.setPointerAndOffset(s, offset); if (checkSize(getLength()-offset)) privateData.assign(data.getData(offset), getLength()-offset); - else - privateData.assign(NULL, 0); } int StreamIdentifierDescriptor::getComponentTag() const { @@ -640,8 +638,6 @@ void LinkageDescriptor::Parse() { data.setPointerAndOffset(s, offset); if (checkSize(getLength()-offset)) privateData.assign(data.getData(offset), getLength()-offset); - else - privateData.assign(NULL, 0); } int LinkageDescriptor::getTransportStreamId() const { diff --git a/libsi/util.h b/libsi/util.h index 91a4c32a..08b16141 100644 --- a/libsi/util.h +++ b/libsi/util.h @@ -6,7 +6,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: util.h 1.6 2006/02/18 10:38:20 kls Exp $ + * $Id: util.h 1.7 2006/02/25 10:13:28 kls Exp $ * * ***************************************************************************/ @@ -59,7 +59,7 @@ public: u_int32_t FourBytes(const int index) const { return data_->data ? data_->FourBytes(off+index) : 0; } bool isValid() const { return data_->valid; } - bool checkSize(int offset) { return (data_->valid && offset>=0 && (data_->valid=(off+offset < data_->size))); } + bool checkSize(int offset) { return (data_->valid && (data_->valid=(offset>=0 && off+offset < data_->size))); } void addOffset(int offset) { off+=offset; } private: