[libdvbpsi-devel] Fix generation of the subtitling 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:50:14 2015 +0200| [8278c52a487d45f3e865a56f25717d4184e11f2b] | committer: Jean-Paul Saman

Fix generation of the subtitling descriptor

The generation function for the subtitling descriptor erroneously uses the
modulo operation instead of a bitwise AND.

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

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

 src/descriptors/dr_59.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/descriptors/dr_59.c b/src/descriptors/dr_59.c
index 9261db8..89a8ce1 100644
--- a/src/descriptors/dr_59.c
+++ b/src/descriptors/dr_59.c
@@ -128,12 +128,12 @@ dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr(
         p_descriptor->p_data[8 * i + 4] =
                 p_decoded->p_subtitle[i].i_composition_page_id >> 8;
         p_descriptor->p_data[8 * i + 5] =
-                p_decoded->p_subtitle[i].i_composition_page_id % 0xFF;
+                p_decoded->p_subtitle[i].i_composition_page_id & 0xFF;
 
         p_descriptor->p_data[8 * i + 6] =
                 p_decoded->p_subtitle[i].i_ancillary_page_id >> 8;
         p_descriptor->p_data[8 * i + 7] =
-                p_decoded->p_subtitle[i].i_ancillary_page_id % 0xFF;
+                p_decoded->p_subtitle[i].i_ancillary_page_id & 0xFF;
     }
 
     if (b_duplicate)



More information about the libdvbpsi-devel mailing list