summaryrefslogtreecommitdiffstats
path: root/gst/mpegtsparse
diff options
context:
space:
mode:
authorZaheer Abbas Merali <zaheerabbas@merali.org>2008-04-01 19:53:53 +0000
committerZaheer Abbas Merali <zaheerabbas@merali.org>2008-04-01 19:53:53 +0000
commit4f42eb7ef9fb02139c1c8a5385972c45de6992e4 (patch)
treef797eb3f966058eb8f08fbe7154893c51cdcc893 /gst/mpegtsparse
parenteaa8e58f0c93a60b02debbb82bb7b1ec9215ee07 (diff)
downloadgst-plugins-bad-4f42eb7ef9fb02139c1c8a5385972c45de6992e4.tar.gz
gst-plugins-bad-4f42eb7ef9fb02139c1c8a5385972c45de6992e4.tar.bz2
gst-plugins-bad-4f42eb7ef9fb02139c1c8a5385972c45de6992e4.zip
gst/mpegtsparse/mpegtspacketizer.c: Cable delivery subsystem descriptors' frequency's bcd is measured in 100Hz units ...
Original commit message from CVS: * gst/mpegtsparse/mpegtspacketizer.c: Cable delivery subsystem descriptors' frequency's bcd is measured in 100Hz units so adjust multiplier accordingly.
Diffstat (limited to 'gst/mpegtsparse')
-rw-r--r--gst/mpegtsparse/mpegtspacketizer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/mpegtsparse/mpegtspacketizer.c b/gst/mpegtsparse/mpegtspacketizer.c
index 6e80f051..526a25df 100644
--- a/gst/mpegtsparse/mpegtspacketizer.c
+++ b/gst/mpegtsparse/mpegtspacketizer.c
@@ -941,8 +941,11 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer * packetizer,
guint8 *frequency_bcd =
DESC_DVB_CABLE_DELIVERY_SYSTEM_frequency (delivery);
- guint32 frequency =
- 10 * ((frequency_bcd[3] & 0x0F) +
+ /* see en 300 468 section 6.2.13.1 least significant bcd digit
+ * is measured in 100Hz units so multiplier needs to be 100 to get
+ * into Hz */
+ guint32 frequency = 100 *
+ ((frequency_bcd[3] & 0x0F) +
10 * ((frequency_bcd[3] & 0xF0) >> 4) +
100 * (frequency_bcd[2] & 0x0F) +
1000 * ((frequency_bcd[2] & 0xF0) >> 4) +