Old subtitles not stopped when switching primary device
Commit Message
Hi!
When switching the primary device, old subtitles are not removed, and
user may get the subtitles of wrong channel or two sets of subtitles at
the same time.
Attached is a hacky patch that doesn't work if MakePrimaryDevice() is
implemented by a plugin device. Unfortunately I haven't currently got
the time to make a proper patch, but this should give you an idea on the
problem.
===================================================================
@@ -313,6 +313,10 @@
void cDevice::MakePrimaryDevice(bool On)
{
+ if (On == false) {
+ DELETENULL(liveSubtitle);
+ DELETENULL(dvbSubtitleConverter);
+ }
}
bool cDevice::SetPrimaryDevice(int n)
===================================================================
@@ -486,6 +486,7 @@
{
if (On && HasDecoder())
new cDvbOsdProvider(fd_osd);
+ cDevice::MakePrimaryDevice(On);
}
bool cDvbDevice::HasDecoder(void) const