Old subtitles not stopped when switching primary device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Anssi Hannula
Index: vdr-1.6.0-primdev/device.c
===================================================================
--- vdr-1.6.0-primdev/device.c
+++ vdr-1.6.0-primdev/device.c	2008-05-23 22:17:05.000000000 +0300
@@ -313,6 +313,10 @@
 
 void cDevice::MakePrimaryDevice(bool On)
 {
+  if (On == false) {
+     DELETENULL(liveSubtitle);
+     DELETENULL(dvbSubtitleConverter);
+  }
 }
 
 bool cDevice::SetPrimaryDevice(int n)
Index: vdr-1.6.0-primdev/dvbdevice.c
===================================================================
--- vdr-1.6.0-primdev/dvbdevice.c
+++ vdr-1.6.0-primdev/dvbdevice.c	2008-05-23 22:18:03.000000000 +0300
@@ -486,6 +486,7 @@
 {
   if (On && HasDecoder())
      new cDvbOsdProvider(fd_osd);
+  cDevice::MakePrimaryDevice(On);
 }
 
 bool cDvbDevice::HasDecoder(void) const
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux