aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Paul Saman <jean-paul.saman@m2x.nl>2014-02-02 11:21:44 (GMT)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>2014-02-04 09:52:03 (GMT)
commitbd595058605b0b209041fd79748002d001ffe03d (patch)
tree249a265bf00abd632b297003b498fd2db5a362ce
parent9da92fa46d1f280a2ba879f2a2b0523227bbb14c (diff)
dr_81, dr_86, dr_a1: Use helper functions.
Use helper functions: - dvbpsi_CanDecodeAsDescriptor() - dvbpsi_IsDescripterDecoded()
-rw-r--r--src/descriptors/dr_81.c4
-rw-r--r--src/descriptors/dr_86.c4
-rw-r--r--src/descriptors/dr_a1.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/descriptors/dr_81.c b/src/descriptors/dr_81.c
index 800e145..ca41c3d 100644
--- a/src/descriptors/dr_81.c
+++ b/src/descriptors/dr_81.c
@@ -48,11 +48,11 @@ dvbpsi_ac3_audio_dr_t *dvbpsi_DecodeAc3AudioDr(dvbpsi_descriptor_t *p_descriptor
uint8_t * buf = p_descriptor->p_data;
/* Check the tag */
- if (p_descriptor->i_tag != 0x81)
+ if (!dvbpsi_CanDecodeAsDescriptor(p_descriptor, 0x81))
return NULL;
/* Don't decode twice */
- if (p_descriptor->p_decoded)
+ if (dvbpsi_IsDescriptorDecoded(p_descriptor))
return p_descriptor->p_decoded;
/* Check length */
diff --git a/src/descriptors/dr_86.c b/src/descriptors/dr_86.c
index c6da64a..e0c4cef 100644
--- a/src/descriptors/dr_86.c
+++ b/src/descriptors/dr_86.c
@@ -48,11 +48,11 @@ dvbpsi_caption_service_dr_t *dvbpsi_DecodeCaptionServiceDr(dvbpsi_descriptor_t *
uint8_t * buf = p_descriptor->p_data;
/* Check the tag */
- if (p_descriptor->i_tag != 0x86)
+ if (!dvbpsi_CanDecodeAsDescriptor(p_descriptor, 0x86))
return NULL;
/* Don't decode twice */
- if (p_descriptor->p_decoded)
+ if (dvbpsi_IsDescriptorDecoded(p_descriptor))
return p_descriptor->p_decoded;
/* Check length */
diff --git a/src/descriptors/dr_a1.c b/src/descriptors/dr_a1.c
index 1647930..faeb8a2 100644
--- a/src/descriptors/dr_a1.c
+++ b/src/descriptors/dr_a1.c
@@ -51,11 +51,11 @@ dvbpsi_DecodeServiceLocationDr (dvbpsi_descriptor_t * p_descriptor)
uint8_t *buf = p_descriptor->p_data;
/* Check the tag */
- if (p_descriptor->i_tag != 0xa1)
+ if (!dvbpsi_CanDecodeAsDescriptor(p_descriptor, 0xa1))
return NULL;
/* Don't decode twice */
- if (p_descriptor->p_decoded)
+ if (dvbpsi_IsDescriptorDecoded(p_descriptor))
return p_descriptor->p_decoded;
/* Check length */

Privacy Policy