Commit efbd8f15 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dr_56.c: fix generation of descriptors with multiple teletext pages.

parent fe4f067d
...@@ -112,15 +112,15 @@ dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(dvbpsi_teletext_dr_t * p_decoded, ...@@ -112,15 +112,15 @@ dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(dvbpsi_teletext_dr_t * p_decoded,
/* Encode data */ /* Encode data */
for (int i = 0; i < p_decoded->i_pages_number; i++ ) 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, p_decoded->p_pages[i].i_iso6392_language_code,
3); 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) ( ( (uint8_t) p_decoded->p_pages[i].i_teletext_type << 3 ) |
( (uint8_t) p_decoded->p_pages[i].i_teletext_magazine_number & 0x07 ) ); ( (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; 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