} else if (STRCASECMP(name, "PCMMultichannel") == 0) {
prefered_ac3 = 2;
}
+ delete[] name;
}
name = vdr->configLoad("AudioOMX", "Mp2DecodingMode");
} else if (STRCASECMP(name, "PCMMultichannel") == 0) {
prefered_mp2 = 2;
}
+ delete[] name;
}
name = vdr->configLoad("AudioOMX", "AACDecodingMode");
} else if (STRCASECMP(name, "PCMMultichannel") == 0) {
prefered_aac = 2;
}
+ delete[] name;
}
name = vdr->configLoad("AudioOMX", "Mp3DecodingMode");
} else if (STRCASECMP(name, "PCMMultichannel") == 0) {
prefered_mp3 = 2;
}
+ delete[] name;
}
name = vdr->configLoad("AudioOMX", "AudioOutput");
} else if (STRCASECMP(name, "HDMI") == 0) {
hdmi = true;
}
+ delete[] name;
}
int BoxStack::shutdown()
{
if (!initted) return 0;
-
- // FIXME don't think this can work properly, removeAll leaves the wallpaper there!
removeAll();
-
initted = 0;
return 1;
}
+void BoxStack::removeAll()
+{
+ removeAllExceptWallpaper();
+ if (numBoxes == 1) remove(boxes[0]);
+}
+
int BoxStack::addVideoDisplay(Boxx* box,VideoDisplay vd)
{
boxLock.Lock();
boxLock.Unlock();
-toDelete->preDelete();
+ toDelete->preDelete();
boxLock.Lock();
// ---------------------------------------------------- END OF REMOVE CODE
-void BoxStack::removeAll()
+void BoxStack::removeAllExceptWallpaper()
{
// 1.. Don't delete wallpaper. No point.
// These functions do internal locking, so can be called directly from any thread. Hopefully.
int add(Boxx*);
int remove(Boxx*);
+ void removeAllExceptWallpaper();
void removeAll();
void update(Boxx*, Region* regionToUpdate = NULL);
void redrawAllBoxes();
#endif
+
+ boxstack->removeAllExceptWallpaper();
+ boxstack->remove(wallpaper);
+ delete wallpaper_pict; wallpaper_pict = NULL; wallpaper = NULL;
+
}
void Command::setSignal(int signalReceived)
}
case Message::CHANGE_LANGUAGE:
{
- boxstack->removeAll();
+ boxstack->removeAllExceptWallpaper();
boxstack->update(wallpaper);
I18n::initialize();
if (!VDR::getInstance()->isConnected()) { connectionLost(); break; }
if (!isStandby)
{
VDR::getInstance()->shutdownVDR();
- boxstack->removeAll();
+ boxstack->removeAllExceptWallpaper();
Video::getInstance()->signalOff();
boxstack->update(wallpaper);
{
logger->unsetExternLogger();
VDR::getInstance()->disconnect();
- boxstack->removeAll();
+ boxstack->removeAllExceptWallpaper();
boxstack->update(wallpaper);
connLost = NULL;
// Oh sheesh, need to switch format. Bye bye TV...
// Take everything down
- boxstack->removeAll();
+ boxstack->removeAllExceptWallpaper();
boxstack->remove(wallpaper);
+ delete wallpaper_pict; wallpaper_pict = NULL; wallpaper = NULL;
+
Osd* osd = Osd::getInstance();
#ifndef __ANDROID__
osd->shutdown();
vdr->configSave("General", "LangCode", code.c_str());
}
vdr->getLanguageContent(code, Translations);
+ if (lang) delete[] lang;
return 1;
}
int Log::shutdown()
{
if (!initted) return 1;
- if (enabled) fclose(logfile);
+ if (enabled && (logfile != stdout)) fclose(logfile);
return 1;
}
command->run();
// When that returns quit ------------------------------------------------------------------------------------------
-
shutdown(0);
return 0;
}
if (cur_fontname) free(cur_fontname);
if (freetype_inited) FT_Done_Face(ft_face);
+
+ // I think the following is broken as it is, but also possibly it shouldn't be free()ing the memory
+ // pointed at anyway, so it's correctly not working?!
+
if (!fontnames.size()) {
vector<char*>::iterator itty=fontnames.begin();
while (itty!=fontnames.end()) {
itty++;
}
}
- if (!fontnames_keys.size()) {
+
+ // end
+
+
+
+ if (fontnames_keys.size()) {
vector<char*>::iterator itty=fontnames_keys.begin();
while (itty!=fontnames_keys.end()) {
free((void*)*itty);
-
itty++;
}
}
if (sscanf(keytrans, "%lXI%lXK%lX", &ul1, &ul2, &uc) == 3) {
translist[((ULLONG) ul1) | ((ULLONG) ul2) << 32] = (UCHAR) uc;
}
+ delete[] keytrans;
}
}
} else if (STRCASECMP(name, "Cec") == 0) {
cechandlesvolume=true;
}
+ delete[] name;
}
return Remote::loadOptionsfromServer(vdr);
}
if (!initted) return 1;
if (threadIsActive()) threadCancel();
ds->shutdown();
+ delete ds;
initted = 0;
return 1;
deinterlace = 3; // this does not activate deinterlacing but a image filter, just for fun
}*/
Log::getInstance()->log("Video", Log::DEBUG, "Set deinterlacing to %s %d",name,deinterlace);
+ delete[] name;
}
return true;
void VInfo::setMainText(const char* takeText)
{
+ if (mainText) delete[] mainText;
int length = strlen(takeText);
mainText = new char[length + 1];
strcpy(mainText, takeText);
void VInfo::setOneLiner(const char* takeText)
{
+ if (mainText) delete[] mainText;
int length = strlen(takeText);
mainText = new char[length + 1];
strcpy(mainText, takeText);