aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-08-17 00:28:27 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-08-17 00:28:27 +0000
commit51898bc759bfaf183be3cec16e965414356dd621 (patch)
treead6046a32b4464b5d139df7cebf915ea4f303b19 /lib
parenta962b75cb46d2d31613a9de51784ff342841b33d (diff)
downloadenigma2-51898bc759bfaf183be3cec16e965414356dd621.tar.gz
enigma2-51898bc759bfaf183be3cec16e965414356dd621.zip
take care of mpeg frame protection bit
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/radiotext.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/dvb/radiotext.cpp b/lib/dvb/radiotext.cpp
index 0ac71751..6ab2fdd8 100644
--- a/lib/dvb/radiotext.cpp
+++ b/lib/dvb/radiotext.cpp
@@ -82,6 +82,7 @@ void eDVBRadioTextParser::processPESPacket(__u8 *data, int len)
int channel = mode == 3 ? 1 : 2;
int id = (data[pos + 1] >> 3) & 1;
int emphasis_bit = data[pos + 3] & 3;
+ int protection_bit = data[pos + 1] & 1;
int rate = -1;
int sample_freq = -1;
int layer = -1;
@@ -112,16 +113,8 @@ void eDVBRadioTextParser::processPESPacket(__u8 *data, int len)
pos += frame_size;
- int offs = pos - 1;
- if (data[offs] != 0xFD)
- {
- offs -= 2;
- if (data[offs] != 0xFD)
- return;
- else
- eDebug("match 2");
- }
- else
+ int offs = protection_bit ? pos - 1 : pos - 3;
+ if (data[offs] == 0xFD)
{
int ancillary_len = 1 + data[offs - 1];
offs -= ancillary_len;