summaryrefslogtreecommitdiffstats
path: root/gst/mpegtsparse
diff options
context:
space:
mode:
authorZaheer Abbas Merali <zaheerabbas@merali.org>2008-01-25 09:50:07 +0000
committerZaheer Abbas Merali <zaheerabbas@merali.org>2008-01-25 09:50:07 +0000
commitdf581d423f726462e113246d349ec126f25ee512 (patch)
tree7539956b21a6c5c4a4acb7abe4af98afbaa4f819 /gst/mpegtsparse
parentf1e76e386bcaad9db63b860f599514f297958324 (diff)
downloadgst-plugins-bad-df581d423f726462e113246d349ec126f25ee512.tar.gz
gst-plugins-bad-df581d423f726462e113246d349ec126f25ee512.tar.bz2
gst-plugins-bad-df581d423f726462e113246d349ec126f25ee512.zip
gst/mpegtsparse/mpegtspacketizer.c: The logic for the guard interval calculation was totally wrong.
Original commit message from CVS: * gst/mpegtsparse/mpegtspacketizer.c: The logic for the guard interval calculation was totally wrong. Fixed.
Diffstat (limited to 'gst/mpegtsparse')
-rw-r--r--gst/mpegtsparse/mpegtspacketizer.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/gst/mpegtsparse/mpegtspacketizer.c b/gst/mpegtsparse/mpegtspacketizer.c
index d4c05041..4be21dc1 100644
--- a/gst/mpegtsparse/mpegtspacketizer.c
+++ b/gst/mpegtsparse/mpegtspacketizer.c
@@ -827,8 +827,6 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer * packetizer,
DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM_other_frequency (delivery);
gchar *constellation_str, *code_rate_hp_str, *code_rate_lp_str,
*transmission_mode_str;
- int i;
-
/* do the stuff */
/* bandwidth is 8 if 0, 7 if 1, 6 if 2, reserved otherwise */
if (bandwidth <= 2)
@@ -896,8 +894,21 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer * packetizer,
code_rate_lp_str = "reserved";
}
/* guard is 32 if 0, 16 if 1, 8 if 2, 4 if 4 */
- for (i = 0; i < guard_interval - 4; i++) {
- guard_interval *= 2;
+ switch (guard_interval) {
+ case 0:
+ guard_interval = 32;
+ break;
+ case 1:
+ guard_interval = 16;
+ break;
+ case 2:
+ guard_interval = 8;
+ break;
+ case 4:
+ guard_interval = 4;
+ break;
+ default: /* make it default to 32 */
+ guard_interval = 32;
}
switch (transmission_mode) {
case 0: