Ticket #2263: mythtv-0.19-pcr-patch

File mythtv-0.19-pcr-patch, 1.5 KB (added by lpgcritter at nasquan dt com, 18 years ago)
Line 
1Index: dvbrecorder.cpp
2===================================================================
3--- dvbrecorder.cpp     (revision 10961)
4+++ dvbrecorder.cpp     (working copy)
5@@ -321,6 +321,8 @@
6     info->isVideo = StreamID::IsVideo(stream_type);
7     // Add the file descriptor to the filter list
8     info->filter_fd = fd_tmp;
9+    // Set isPCR if it's a PCR only stream
10+    info->isPCR = (pes_type == DMX_PES_PCR);
11 
12     // If we are in legacy PES mode, initialize TS->PES converter
13     if (!_record_transport_stream_option)
14@@ -396,7 +398,7 @@
15     }
16 
17     if (!_hw_decoder_option && need_pcr_pid && (_input_pmt.PCRPID != 0))
18-        OpenFilter(_input_pmt.PCRPID, ES_TYPE_UNKNOWN, DMX_PES_OTHER,
19+        OpenFilter(_input_pmt.PCRPID, ES_TYPE_UNKNOWN, DMX_PES_PCR,
20                     (*es).Orig_Type);
21 
22 
23@@ -787,7 +789,7 @@
24     // _after_ first keyframe iff _wait_for_keyframe_option is true
25     if (!info->payloadStartSeen)
26     {
27-        if (!tspacket.PayloadStart())
28+        if (!tspacket.PayloadStart() && !info->isPCR)
29             return true; // not payload start - drop packet
30 
31         VERBOSE(VB_RECORD,
32Index: dvbrecorder.h
33===================================================================
34--- dvbrecorder.h       (revision 10961)
35+++ dvbrecorder.h       (working copy)
36@@ -42,6 +42,8 @@
37     bool   isEncrypted;       ///< true if PID is marked as encrypted
38     bool   payloadStartSeen;  ///< true if payload start packet seen on PID
39 
40+    bool   isPCR;             ///< true if the stream is PCR only
41+
42     inline void Close(void);
43     inline bool CheckCC(uint cc);
44 };