Commit c6a4b07b authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by 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: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent d444eb83
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment