aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-05-30 18:28:36 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2014-05-30 16:31:44 +0000
commitbc3ab61ddacab2ec6072c2709af3df405e18dfc3 (patch)
treef9b70c026ca50ac8bb9abb05af5aa5da3f042e4e
parent9f0419d376d25d738539bac2b55197abe226a6ce (diff)
make next time offset filterable
Change-Id: I18c2b7992b237eaaacbec04d504fc293b03558a3 Reviewed-on: https://code.wireshark.org/review/1887 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
-rw-r--r--epan/dissectors/packet-mpeg-descriptor.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-mpeg-descriptor.c b/epan/dissectors/packet-mpeg-descriptor.c
index a610c970c5..828e0272f1 100644
--- a/epan/dissectors/packet-mpeg-descriptor.c
+++ b/epan/dissectors/packet-mpeg-descriptor.c
@@ -1725,9 +1725,8 @@ static void
proto_mpeg_descriptor_dissect_local_time_offset(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
guint end = offset + len;
- guint16 time_offset;
guint8 hour, min;
- nstime_t local_time_offset, time_of_change;
+ nstime_t local_time_offset, time_of_change, next_time_offset;
while (offset < end) {
proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_country_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
@@ -1754,11 +1753,12 @@ proto_mpeg_descriptor_dissect_local_time_offset(tvbuff_t *tvb, guint offset, gui
}
offset += 5;
- time_offset = tvb_get_ntohs(tvb, offset);
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_local_time_offset_next_time_offset, tvb, offset, 2,
- "Next Time Offset", "%02u:%02u",
- MPEG_SECT_BCD44_TO_DEC(time_offset >> 8),
- MPEG_SECT_BCD44_TO_DEC(time_offset));
+ hour = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset));
+ min = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset+1));
+ nstime_set_zero(&next_time_offset);
+ next_time_offset.secs = hour*60*60 + min*60;
+ proto_tree_add_time_format_value(tree, hf_mpeg_descr_local_time_offset_next_time_offset,
+ tvb, offset, 2, &next_time_offset, "%02d:%02d", hour, min);
offset += 2;
}
}
@@ -3767,7 +3767,7 @@ proto_register_mpeg_descriptor(void)
{ &hf_mpeg_descr_local_time_offset_next_time_offset, {
"Next Time Offset", "mpeg_descr.local_time_offset.next_time_offset",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0, NULL, HFILL
} },
/* 0x59 Subtitling Descriptor */