diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 0e14e16..6787d5e 100644
a
|
b
|
void AvFormatDecoder::DecodeDTVCC(const uint8_t *buf, uint len, bool scte) |
2559 | 2559 | { |
2560 | 2560 | uint cc_code = buf[2+(cur*3)]; |
2561 | 2561 | bool cc_valid = cc_code & 0x04; |
2562 | | if (!cc_valid) |
2563 | | continue; |
2564 | 2562 | |
2565 | 2563 | uint data1 = buf[3+(cur*3)]; |
2566 | 2564 | uint data2 = buf[4+(cur*3)]; |
… |
… |
void AvFormatDecoder::DecodeDTVCC(const uint8_t *buf, uint len, bool scte) |
2568 | 2566 | uint cc_type = cc_code & 0x03; |
2569 | 2567 | uint field; |
2570 | 2568 | |
| 2569 | if (!cc_valid) { |
| 2570 | if (cc_type >= 0x2) { |
| 2571 | ccd708->decode_cc_null(); |
| 2572 | } |
| 2573 | continue; |
| 2574 | } |
| 2575 | |
2571 | 2576 | if (scte || cc_type <= 0x1) // EIA-608 field-1/2 |
2572 | 2577 | { |
2573 | 2578 | if (cc_type == 0x2) |
diff --git a/mythtv/libs/libmythtv/cc708decoder.cpp b/mythtv/libs/libmythtv/cc708decoder.cpp
index cb551c5..516438f 100644
a
|
b
|
void CC708Decoder::decode_cc_data(uint cc_type, uint data1, uint data2) |
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
| 69 | void CC708Decoder::decode_cc_null() |
| 70 | { |
| 71 | if (partialPacket.size && reader) |
| 72 | parse_cc_packet(reader, &partialPacket, last_seen); |
| 73 | |
| 74 | partialPacket.size = 0; |
| 75 | } |
| 76 | |
69 | 77 | void CC708Decoder::services(uint seconds, bool seen[64]) const |
70 | 78 | { |
71 | 79 | time_t now = time(NULL); |
diff --git a/mythtv/libs/libmythtv/cc708decoder.h b/mythtv/libs/libmythtv/cc708decoder.h
index 4a00073..21bd499 100644
a
|
b
|
class CC708Decoder |
32 | 32 | ~CC708Decoder() {} |
33 | 33 | |
34 | 34 | void decode_cc_data(uint cc_type, uint data1, uint data2); |
| 35 | void decode_cc_null(); |
35 | 36 | |
36 | 37 | /// \return Services seen in last few seconds as specified. |
37 | 38 | void services(uint seconds, bool[64]) const; |