aboutsummaryrefslogtreecommitdiff
path: root/multimedia/vdr-plugin-osdteletext/files/patch-osdteletext-vdr-1.7.27.txt
blob: 33c6f5889ed95df792598e3bd503358efffeac77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff --git a/txtrecv.c b/txtrecv.c
index 3dc89f6..3de5c1d 100644
--- a/txtrecv.c
+++ b/txtrecv.c
@@ -518,7 +518,7 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber
    int TPid = newLiveChannel->Tpid();
 
    if (TPid) {
-      receiver = new cTxtReceiver(TPid, newLiveChannel->GetChannelID(), storeTopText, storage);
+      receiver = new cTxtReceiver(newLiveChannel, storeTopText, storage);
       cDevice::ActualDevice()->AttachReceiver(receiver);
    }
 
@@ -526,10 +526,18 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber
 }
 
 
-cTxtReceiver::cTxtReceiver(int TPid, tChannelID chan, bool storeTopText, Storage* storage)
- : cReceiver(chan, -1, TPid), cThread("osdteletext-receiver"),
+cTxtReceiver::cTxtReceiver(const cChannel* chan, bool storeTopText, Storage* storage)
+#if APIVERSNUM >= 10712
+ : cReceiver(chan, -1), cThread("osdteletext-receiver"),
+#else
+ : cReceiver(chan, -1, chan->Tpid()), cThread("osdteletext-receiver"),
+#endif
    TxtPage(0), storeTopText(storeTopText), buffer((188+60)*75), storage(storage)
 {
+#if APIVERSNUM >= 10712
+   SetPids(NULL);
+   AddPid(chan->Tpid());
+#endif
    storage->prepareDirectory(ChannelID());
 
    // 10 ms timeout on getting TS frames
diff --git a/txtrecv.h b/txtrecv.h
index a111d0d..3468b6e 100644
--- a/txtrecv.h
+++ b/txtrecv.h
@@ -165,7 +165,7 @@ protected:
    virtual void Receive(uchar *Data, int Length);
    virtual void Action();
 public:
-   cTxtReceiver(int TPid, tChannelID chan, bool storeTopText, Storage* storage);
+   cTxtReceiver(const cChannel* chan, bool storeTopText, Storage* storage);
    virtual ~cTxtReceiver();
    virtual void Stop();
 };