Commit c5f609ab authored by Sašo Kiselkov's avatar Sašo Kiselkov

Fixed incorrect short event descriptor field offset computation. The old

algorithm didn't take the event_name_length and text_length fields into
consideration when calculating memcpy offsets for the text field.
parent e8ed4c57
......@@ -112,9 +112,9 @@ dvbpsi_descriptor_t * dvbpsi_GenShortEventDr(dvbpsi_short_event_dr_t * p_decoded
p_descriptor->p_data[3] = i_len1;
if( i_len1 )
memcpy( &p_descriptor->p_data[4], p_decoded->i_event_name, i_len1 );
p_descriptor->p_data[3+i_len1] = i_len2;
p_descriptor->p_data[3+1+i_len1] = i_len2;
if( i_len2 )
memcpy( &p_descriptor->p_data[3+i_len1+1], p_decoded->i_text, i_len2 );
memcpy( &p_descriptor->p_data[3+1+i_len1+1], p_decoded->i_text, i_len2 );
if(b_duplicate)
{
......
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