dr_81, dr_86, dr_a1: Use helper functions.

[email protected] (Jean-Paul Saman)
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <[email protected]>
libdvbpsi | branch: master | Jean-Paul Saman <[email protected]> | Sun Feb  2 12:21:44 2014 +0100| [bd595058605b0b209041fd79748002d001ffe03d] | committer: Jean-Paul Saman

dr_81, dr_86, dr_a1: Use helper functions.

Use helper functions:
- dvbpsi_CanDecodeAsDescriptor()
- dvbpsi_IsDescripterDecoded()

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=bd595058605b0b209041fd79748002d001ffe03d
---

 src/descriptors/dr_81.c |    4 ++--
 src/descriptors/dr_86.c |    4 ++--
 src/descriptors/dr_a1.c |    4 ++--
 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 */

_______________________________________________
libdvbpsi-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvbpsi-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.