[libdvbpsi-devel] Fix generation of the teletext descriptor

Daniel Kamil Kozar git at videolan.org
Mon Aug 24 12:54:44 CEST 2015


libdvbpsi | branch: master | Daniel Kamil Kozar <dkk089 at gmail.com> | Sun Jul 19 01:30:24 2015 +0200| [c6a4b07be83720f98721402dc48bfe51e99c1549] | committer: Jean-Paul Saman

Fix generation of the teletext descriptor

The index variable in the generation function for the telext descriptor was
scaled by 8 instead of by 5.

(cherry picked from commit 614bfbaebdbfda25f2cb7015e71f997f8874930e)
Signed-off-by: Jean-Paul Saman <jpsaman at videolan.org>

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

 src/descriptors/dr_56.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/descriptors/dr_56.c b/src/descriptors/dr_56.c
index 4729cf0..d81e90d 100644
--- a/src/descriptors/dr_56.c
+++ b/src/descriptors/dr_56.c
@@ -112,15 +112,15 @@ dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(dvbpsi_teletext_dr_t * p_decoded,
     /* Encode data */
     for (int i = 0; i < p_decoded->i_pages_number; i++ )
     {
-        memcpy( p_descriptor->p_data + 8 * i,
+        memcpy( p_descriptor->p_data + 5 * i,
                 p_decoded->p_pages[i].i_iso6392_language_code,
                 3);
 
-        p_descriptor->p_data[8 * i + 3] =
+        p_descriptor->p_data[5 * i + 3] =
                 (uint8_t) ( ( (uint8_t) p_decoded->p_pages[i].i_teletext_type << 3 ) |
                             ( (uint8_t) p_decoded->p_pages[i].i_teletext_magazine_number & 0x07 ) );
 
-        p_descriptor->p_data[8 * i + 4] =
+        p_descriptor->p_data[5 * i + 4] =
                 p_decoded->p_pages[i].i_teletext_page_number;
     }
 



More information about the libdvbpsi-devel mailing list