Commit 52badb40 authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by Jean-Paul Saman

Fix invalid calculation of the number of NVOD structures in dr_4b

Since one NVOD reference structure takes 6 bytes, the number of all structures
contained in the descriptor should be the length of its payload divided by 6,
not the remainder of this division.

(cherry picked from commit 057ca087fd1c74a5af92422801ca36f2e23787e0)
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 806c4571
......@@ -65,7 +65,7 @@ dvbpsi_nvod_ref_dr_t* dvbpsi_DecodeNVODReferenceDr(dvbpsi_descriptor_t * p_descr
return NULL;
/* Decode data */
p_decoded->i_references = p_descriptor->i_length % 6;
p_decoded->i_references = p_descriptor->i_length / 6;
if (p_decoded->i_references > 43)
p_decoded->i_references = 43;
......
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