Compare commits

...

13 Commits

Author SHA1 Message Date
Klaus Schmidinger
cea1e4061f Official release of version 2.4.8 2021-12-27 11:30:19 +01:00
Klaus Schmidinger
2dc383d362 Fixed calculating the disk use percentage if there's more than 20TB of recordings 2021-12-27 11:20:35 +01:00
Klaus Schmidinger
a16a451c1f Fixed a possible memory leak in creating fonts 2021-12-27 11:16:04 +01:00
Klaus Schmidinger
26412e8888 Fixed a memory leak in handling the NIT 2021-12-27 11:11:16 +01:00
Klaus Schmidinger
2e1b2107e7 Fixed unlocking vs. call to EpgHandlers.EndSegmentTransfer() 2021-12-27 11:05:38 +01:00
Klaus Schmidinger
ba5eee6cb8 Fixed cTsPayload::AtPayloadStart() to ignore TS packets from other PIDs 2021-12-27 11:00:05 +01:00
Klaus Schmidinger
1861074241 Fixed a possible crash in the Schedule menu, in case Setup.EPGLinger is 0 2021-12-27 10:53:46 +01:00
Klaus Schmidinger
178f2cacf9 Official release of version 2.4.7 2021-04-21 13:51:28 +02:00
Klaus Schmidinger
c276c6883d Fixed initializing the cChannel::schedule pointer after reading EPG data with PUTE 2021-01-04 14:58:59 +01:00
Klaus Schmidinger
163945045d Fixed handling $(PKG_CONFIG) in newplugin 2021-01-02 15:22:42 +01:00
Klaus Schmidinger
5f1e08f606 Fixed a crash in the SVDRP command CLRE in case a non-existing channel number is given 2021-01-02 15:18:06 +01:00
Klaus Schmidinger
9f4c5cd785 The Makefile now makes sure the 'x' bit of Doxyfile.filter is set before calling doxygen 2021-01-02 15:11:20 +01:00
Klaus Schmidinger
3211df30df Fixed strreplace() to handle NULL strings 2021-01-02 15:05:48 +01:00
14 changed files with 81 additions and 27 deletions

View File

@ -2445,6 +2445,7 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
for implementing anti-aliasing for cPixmap::DrawSlope() and cPixmap::DrawEllipse() for implementing anti-aliasing for cPixmap::DrawSlope() and cPixmap::DrawEllipse()
for reporting an unnecessary double call to Display() in cMenuRecording::RefreshRecording() for reporting an unnecessary double call to Display() in cMenuRecording::RefreshRecording()
for reporting too much memory being allocated in the cImage constructors for reporting too much memory being allocated in the cImage constructors
for reporting a problem with the call to EpgHandlers.EndSegmentTransfer()
Pekka Mauno <pekka.mauno@iki.fi> Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present for fixing cSchedule::GetFollowingEvent() in case there is currently no present
@ -2773,6 +2774,7 @@ Winfried K
for adding initialization of cDvbFrontend::frontendInfo for adding initialization of cDvbFrontend::frontendInfo
for improving handling missing VDRPluginDestroyer() for improving handling missing VDRPluginDestroyer()
for fixing a compiler warning for fixing a compiler warning
for fixing handling $(PKG_CONFIG) in newplugin
Hans-Werner Hilse <hilse@web.de> Hans-Werner Hilse <hilse@web.de>
for adding the command line option --userdump to enable core dumps in case VDR for adding the command line option --userdump to enable core dumps in case VDR
@ -2938,6 +2940,10 @@ Manuel Reimer <Manuel.Reimer@gmx.de>
for reporting a bug in moving channels between number groups in SVDRP's MOVC command for reporting a bug in moving channels between number groups in SVDRP's MOVC command
for fixing compatibility with current versions of glibc for fixing compatibility with current versions of glibc
for suggesting to make the SVDRP command DELC accept a channel id for suggesting to make the SVDRP command DELC accept a channel id
for reporting a crash in the SVDRP command CLRE in case a non-existing channel
number is given
for reporting that LSTE doesn't work after PUTE in case a channel didn't already
have EPG data
Rene van den Braken <rene@vandenbraken.name> Rene van den Braken <rene@vandenbraken.name>
for reporting a bug in writing the PCR pid into the PMT in for reporting a bug in writing the PCR pid into the PMT in
@ -3643,6 +3649,8 @@ Helmut Binder <cco@aon.at>
PMT pid were checked any more PMT pid were checked any more
for reporting a problem with PMT handling in case locking the Channels list times out for reporting a problem with PMT handling in case locking the Channels list times out
for avoiding a lengthy lock on the Channels list when starting a recording for avoiding a lengthy lock on the Channels list when starting a recording
for fixing a memory leak in handling the NIT
for reporting a possible memory leak in creating fonts
Ulrich Eckhardt <uli@uli-eckhardt.de> Ulrich Eckhardt <uli@uli-eckhardt.de>
for reporting a problem with shutdown after user inactivity in case a plugin is for reporting a problem with shutdown after user inactivity in case a plugin is
@ -3655,6 +3663,8 @@ J
for reporting a possible discrepancy of the primary device number in the LSTD and for reporting a possible discrepancy of the primary device number in the LSTD and
PRIM commands PRIM commands
for adding support for EAC3 audio from other sources for adding support for EAC3 audio from other sources
for reporting a crash if a pattern timer spawns a timer that uses EPISODE and the
event has no short text
Stefan Verse <Verse@amotronics.de> Stefan Verse <Verse@amotronics.de>
for fixing an occasional black screen when switching channels for fixing an occasional black screen when switching channels
@ -3664,3 +3674,7 @@ Jens Schleusener <Jens.Schleusener@fossies.org>
Bernd Kuhls <bernd.kuhls@t-online.de> Bernd Kuhls <bernd.kuhls@t-online.de>
for fixing possible compilation errors with libjpeg for fixing possible compilation errors with libjpeg
Timo Weingärtner <timo@tiwe.de>
for reporting an integer overflow in calculating the disk use percentage if there's
more than 20TB of recordings

24
HISTORY
View File

@ -9562,3 +9562,27 @@ Video Disk Recorder Revision History
- Fixed a compiler warning (thanks to Winfried Köhler). - Fixed a compiler warning (thanks to Winfried Köhler).
- Fixed convertCharacterTable() in case iconv_open() fails (thanks to Helmut Binder). - Fixed convertCharacterTable() in case iconv_open() fails (thanks to Helmut Binder).
- Official release. - Official release.
2021-04-21: Version 2.4.7
- Fixed strreplace() to handle NULL strings (reported by Jürgen Schneider).
- Somewhere down the road the 'x' bit of Doxyfile.filter got lost, so the
Makefile now makes sure it is set before calling doxygen.
- Fixed a crash in the SVDRP command CLRE in case a non-existing channel number is
given (reported by Manuel Reimer).
- Fixed handling $(PKG_CONFIG) in newplugin (thanks to Winfried Köhler).
- Fixed initializing the cChannel::schedule pointer after reading EPG data with PUTE
(reported by Manuel Reimer).
- Official release.
2021-12-27: Version 2.4.8
- Fixed a possible crash in the Schedule menu, in case Setup.EPGLinger is 0.
- Fixed cTsPayload::AtPayloadStart() to ignore TS packets from other PIDs.
- Fixed unlocking vs. call to EpgHandlers.EndSegmentTransfer() (reported by Christoph
Haubrich).
- Fixed a memory leak in handling the NIT (thanks to Helmut Binder).
- Fixed a possible memory leak in creating fonts (reported by Helmut Binder).
- Fixed calculating the disk use percentage if there's more than 20TB of recordings
(reported by Timo Weingärtner).
- Official release.

View File

@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and # See the main source file 'vdr.c' for copyright information and
# how to reach the author. # how to reach the author.
# #
# $Id: Makefile 4.10 2020/06/27 09:13:04 kls Exp $ # $Id: Makefile 4.10.1.1 2021/01/02 15:11:20 kls Exp $
.DELETE_ON_ERROR: .DELETE_ON_ERROR:
@ -342,6 +342,7 @@ install-pc: vdr.pc
srcdoc: srcdoc:
@cat $(DOXYFILE) > $(DOXYFILE).tmp @cat $(DOXYFILE) > $(DOXYFILE).tmp
@echo PROJECT_NUMBER = $(VDRVERSION) >> $(DOXYFILE).tmp @echo PROJECT_NUMBER = $(VDRVERSION) >> $(DOXYFILE).tmp
@chmod +x $(DOXYFILE).filter
$(DOXYGEN) $(DOXYFILE).tmp $(DOXYGEN) $(DOXYFILE).tmp
@rm $(DOXYFILE).tmp @rm $(DOXYFILE).tmp

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: config.h 4.21 2020/12/22 17:23:51 kls Exp $ * $Id: config.h 4.21.1.2 2021/12/27 11:29:58 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -22,13 +22,13 @@
// VDR's own version number: // VDR's own version number:
#define VDRVERSION "2.4.6" #define VDRVERSION "2.4.8"
#define VDRVERSNUM 20406 // Version * 10000 + Major * 100 + Minor #define VDRVERSNUM 20408 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number: // The plugin API's version number:
#define APIVERSION "2.4.6" #define APIVERSION "2.4.8"
#define APIVERSNUM 20406 // Version * 10000 + Major * 100 + Minor #define APIVERSNUM 20408 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which // When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to // may be smaller than VDRVERSION in case there have been no changes to

4
eit.c
View File

@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>. * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
* *
* $Id: eit.c 4.11 2020/11/28 21:45:05 kls Exp $ * $Id: eit.c 4.11.1.1 2021/12/27 11:04:03 kls Exp $
*/ */
#include "eit.h" #include "eit.h"
@ -361,9 +361,9 @@ cEIT::cEIT(cSectionSyncerHash &SectionSyncerHash, int Source, u_char Tid, const
EpgHandlers.DropOutdated(pSchedule, SegmentStart, SegmentEnd, Tid, getVersionNumber()); EpgHandlers.DropOutdated(pSchedule, SegmentStart, SegmentEnd, Tid, getVersionNumber());
pSchedule->SetModified(); pSchedule->SetModified();
} }
EpgHandlers.EndSegmentTransfer(Modified);
SchedulesStateKey.Remove(Modified); SchedulesStateKey.Remove(Modified);
ChannelsStateKey.Remove(ChannelsModified); ChannelsStateKey.Remove(ChannelsModified);
EpgHandlers.EndSegmentTransfer(Modified);
} }
// --- cTDT ------------------------------------------------------------------ // --- cTDT ------------------------------------------------------------------

11
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* *
* $Id: epg.c 4.9 2019/05/20 09:55:22 kls Exp $ * $Id: epg.c 4.9.1.2 2021/12/27 10:52:38 kls Exp $
*/ */
#include "epg.h" #include "epg.h"
@ -1311,9 +1311,14 @@ bool cSchedules::Read(FILE *f)
fclose(f); fclose(f);
if (result) { if (result) {
// Initialize the channels' schedule pointers, so that the first WhatsOn menu will come up faster: // Initialize the channels' schedule pointers, so that the first WhatsOn menu will come up faster:
for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) {
if (const cSchedule *Schedule = Channel->schedule) {
if (!Schedule->ChannelID().Valid()) // this is the DummySchedule
Channel->schedule = NULL;
}
Schedules->GetSchedule(Channel); Schedules->GetSchedule(Channel);
} }
}
return result; return result;
} }
@ -1342,6 +1347,8 @@ const cSchedule *cSchedules::GetSchedule(const cChannel *Channel, bool AddIfMiss
{ {
// This is not very beautiful, but it dramatically speeds up the // This is not very beautiful, but it dramatically speeds up the
// "What's on now/next?" menus. // "What's on now/next?" menus.
if (!Channel)
return NULL;
static cSchedule DummySchedule(tChannelID::InvalidID); static cSchedule DummySchedule(tChannelID::InvalidID);
if (!Channel->schedule) if (!Channel->schedule)
Channel->schedule = GetSchedule(Channel->GetChannelID()); Channel->schedule = GetSchedule(Channel->GetChannelID());

6
font.c
View File

@ -6,7 +6,7 @@
* *
* BiDi support by Osama Alrawab <alrawab@hotmail.com> @2008 Tripoli-Libya. * BiDi support by Osama Alrawab <alrawab@hotmail.com> @2008 Tripoli-Libya.
* *
* $Id: font.c 4.2 2016/12/22 12:31:23 kls Exp $ * $Id: font.c 4.2.1.1 2021/12/27 11:14:05 kls Exp $
*/ */
#include "font.h" #include "font.h"
@ -429,8 +429,10 @@ cFont *cFont::CreateFont(const char *Name, int CharHeight, int CharWidth)
{ {
cString fn = GetFontFileName(Name); cString fn = GetFontFileName(Name);
cFont *f = *fn ? new cFreetypeFont(fn, CharHeight, CharWidth) : NULL; cFont *f = *fn ? new cFreetypeFont(fn, CharHeight, CharWidth) : NULL;
if (!f || !f->Height()) if (!f || !f->Height()) {
delete f;
f = new cDummyFont(CharHeight, CharWidth); f = new cDummyFont(CharHeight, CharWidth);
}
return f; return f;
} }

View File

@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and # See the main source file 'vdr.c' for copyright information and
# how to reach the author. # how to reach the author.
# #
# $Id: newplugin 4.4 2020/06/22 15:08:46 kls Exp $ # $Id: newplugin 4.4.1.1 2021/01/02 15:22:42 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n"; $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@ -76,7 +76,7 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{
# Use package data if installed...otherwise assume we're under the VDR source directory: # Use package data if installed...otherwise assume we're under the VDR source directory:
PKG_CONFIG ?= pkg-config PKG_CONFIG ?= pkg-config
PKGCFG = \$(if \$(VDRDIR),\$(shell $(PKG_CONFIG) --variable=\$(1) \$(VDRDIR)/vdr.pc),\$(shell PKG_CONFIG_PATH="\$\$PKG_CONFIG_PATH:../../.." $(PKG_CONFIG) --variable=\$(1) vdr)) PKGCFG = \$(if \$(VDRDIR),\$(shell \$(PKG_CONFIG) --variable=\$(1) \$(VDRDIR)/vdr.pc),\$(shell PKG_CONFIG_PATH="\$\$PKG_CONFIG_PATH:../../.." \$(PKG_CONFIG) --variable=\$(1) vdr))
LIBDIR = \$(call PKGCFG,libdir) LIBDIR = \$(call PKGCFG,libdir)
LOCDIR = \$(call PKGCFG,locdir) LOCDIR = \$(call PKGCFG,locdir)
PLGCFG = \$(call PKGCFG,plgcfg) PLGCFG = \$(call PKGCFG,plgcfg)

4
nit.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: nit.c 4.9 2019/05/31 13:25:00 kls Exp $ * $Id: nit.c 4.9.1.1 2021/12/27 11:09:16 kls Exp $
*/ */
#include "nit.h" #include "nit.h"
@ -102,8 +102,10 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) { for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) {
if (d->getDescriptorTag() == SI::S2SatelliteDeliverySystemDescriptorTag) { if (d->getDescriptorTag() == SI::S2SatelliteDeliverySystemDescriptorTag) {
ForceDVBS2 = true; ForceDVBS2 = true;
delete d;
break; break;
} }
delete d;
} }
for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) { for (SI::Loop::Iterator it2; (d = ts.transportStreamDescriptors.getNext(it2)); ) {

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: remux.c 4.9 2020/06/22 12:15:52 kls Exp $ * $Id: remux.c 4.9.1.1 2021/12/27 10:59:22 kls Exp $
*/ */
#include "remux.h" #include "remux.h"
@ -1292,7 +1292,7 @@ int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
tsPayload.Statistics(); tsPayload.Statistics();
break; break;
} }
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary if (tsPayload.AtPayloadStart() // stop at a new payload start to have the buffer refilled if necessary
|| tsPayload.Eof()) // or if we're out of data || tsPayload.Eof()) // or if we're out of data
break; break;
} }
@ -1445,7 +1445,7 @@ int cH264Parser::Parse(const uchar *Data, int Length, int Pid)
default: ; default: ;
} }
} }
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary if (tsPayload.AtPayloadStart() // stop at a new payload start to have the buffer refilled if necessary
|| tsPayload.Eof()) // or if we're out of data || tsPayload.Eof()) // or if we're out of data
break; break;
} }
@ -1603,7 +1603,7 @@ int cH265Parser::Parse(const uchar *Data, int Length, int Pid)
break; break;
} }
} }
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary if (tsPayload.AtPayloadStart() // stop at a new payload start to have the buffer refilled if necessary
|| tsPayload.Eof()) // or if we're out of data || tsPayload.Eof()) // or if we're out of data
break; break;
} }

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: remux.h 4.6 2020/09/16 13:48:33 kls Exp $ * $Id: remux.h 4.6.1.1 2021/12/27 10:58:36 kls Exp $
*/ */
#ifndef __REMUX_H #ifndef __REMUX_H
@ -249,7 +249,7 @@ public:
bool AtTsStart(void) { return index < length && (index % TS_SIZE) == 0; } bool AtTsStart(void) { return index < length && (index % TS_SIZE) == 0; }
///< Returns true if this payload handler is currently pointing to first byte ///< Returns true if this payload handler is currently pointing to first byte
///< of a TS packet. ///< of a TS packet.
bool AtPayloadStart(void) { return AtTsStart() && TsPayloadStart(data + index); } bool AtPayloadStart(void) { return AtTsStart() && TsPayloadStart(data + index) && TsPid(data + index) == pid; }
///< Returns true if this payload handler is currently pointing to the first byte ///< Returns true if this payload handler is currently pointing to the first byte
///< of a TS packet that starts a new payload. ///< of a TS packet that starts a new payload.
int Available(void) { return length - index; } int Available(void) { return length - index; }

View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured * and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection. * graphical interface that sits on top of an SVDRP connection.
* *
* $Id: svdrp.c 4.43 2020/06/22 20:59:49 kls Exp $ * $Id: svdrp.c 4.43.1.1 2021/01/02 15:18:06 kls Exp $
*/ */
#include "svdrp.h" #include "svdrp.h"
@ -1301,8 +1301,10 @@ void cSVDRPServer::CmdCLRE(const char *Option)
tChannelID ChannelID = tChannelID::InvalidID; tChannelID ChannelID = tChannelID::InvalidID;
if (isnumber(Option)) { if (isnumber(Option)) {
int o = strtol(Option, NULL, 10); int o = strtol(Option, NULL, 10);
if (o >= 1 && o <= cChannels::MaxNumber()) if (o >= 1 && o <= cChannels::MaxNumber()) {
ChannelID = Channels->GetByNumber(o)->GetChannelID(); if (const cChannel *Channel = Channels->GetByNumber(o))
ChannelID = Channel->GetChannelID();
}
} }
else { else {
ChannelID = tChannelID::FromString(Option); ChannelID = tChannelID::FromString(Option);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: tools.c 4.13 2020/11/22 13:32:05 kls Exp $ * $Id: tools.c 4.13.1.1 2021/01/02 15:05:48 kls Exp $
*/ */
#include "tools.h" #include "tools.h"
@ -151,6 +151,8 @@ char *strreplace(char *s, char c1, char c2)
char *strreplace(char *s, const char *s1, const char *s2) char *strreplace(char *s, const char *s1, const char *s2)
{ {
if (!s || !s1 || !s2)
return s;
char *p = strstr(s, s1); char *p = strstr(s, s1);
if (p) { if (p) {
int of = p - s; int of = p - s;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: videodir.c 4.1 2015/08/11 13:39:59 kls Exp $ * $Id: videodir.c 4.1.1.1 2021/12/27 11:18:40 kls Exp $
*/ */
#include "videodir.h" #include "videodir.h"
@ -158,7 +158,7 @@ int cVideoDirectory::VideoDiskSpace(int *FreeMB, int *UsedMB)
*FreeMB = free; *FreeMB = free;
if (UsedMB) if (UsedMB)
*UsedMB = used; *UsedMB = used;
return (free + used) ? used * 100 / (free + used) : 0; return (free + used) ? round(double(used) * 100 / (free + used)) : 0;
} }
cString cVideoDirectory::PrefixVideoFileName(const char *FileName, char Prefix) cString cVideoDirectory::PrefixVideoFileName(const char *FileName, char Prefix)