aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2013-05-19 20:10:30 (GMT)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>2014-02-04 09:52:03 (GMT)
commitc09ed74bcd8303a32adb71962fd6a3dc15b9ac7f (patch)
treec1cdabc86ae72df22b72b55c4a09ebbb030216a2
parente0da97cbe3210764e0d1dc5db7950ef848186fe8 (diff)
dr_a1: remove dependency on function, dvbpsi_get_bits()
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r--src/descriptors/dr_a1.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/descriptors/dr_a1.c b/src/descriptors/dr_a1.c
index 7cac951..bb0c835 100644
--- a/src/descriptors/dr_a1.c
+++ b/src/descriptors/dr_a1.c
@@ -71,10 +71,10 @@ dvbpsi_service_location_dr_t * dvbpsi_DecodeServiceLocationDr(
p_descriptor->p_decoded = (void*)p_decoded;
- p_decoded->i_pcr_pid = dvbpsi_get_bits(buf, 3, 13);
- p_decoded->i_number_elements = dvbpsi_get_bits(buf, 16, 8);
+ p_decoded->i_pcr_pid = ((uint16_t)(buf[0] & 0x1f) << 8) | buf[1];
+ p_decoded->i_number_elements = buf[2];
- buf = &p_descriptor->p_data[3];
+ buf += 3;
for (int i = 0; i < p_decoded->i_number_elements; i++)
{
@@ -85,8 +85,8 @@ dvbpsi_service_location_dr_t * dvbpsi_DecodeServiceLocationDr(
memset(p_element, 0, sizeof(dvbpsi_service_location_element_t));
- p_element->i_stream_type = dvbpsi_get_bits(buf, 0, 8);
- p_element->i_elementary_pid = dvbpsi_get_bits(buf, 11, 13);
+ p_element->i_stream_type = buf[0];
+ p_element->i_elementary_pid = ((uint16_t)(buf[1] & 0x1f) << 8) | buf[2];
memcpy(p_element->i_iso_639_code, &buf[3], 3);
if (p_decoded->p_first_element == NULL)

Privacy Policy