aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/file-mp4.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-12 13:22:05 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-13 22:56:36 +0000
commita869ec6f55160622a90bc437517dee91d57f85d5 (patch)
treeea55cf7ba5f820af87e01d2a28d38d6b6ebe547e /epan/dissectors/file-mp4.c
parente150235ef14cf6a9ada7d74c534e4aee469f3ac5 (diff)
Adjust proto_tree_add_[float|double]_format_value calls to use unit string
Several calls to proto_tree_add_[float|double]_xxx could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. Added a few more "common" unit string values to unit_strings.[ch] Change-Id: Id0da7b579403898d20c2667d6c4abcd59d5a48d4 Reviewed-on: https://code.wireshark.org/review/19241 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/file-mp4.c')
-rw-r--r--epan/dissectors/file-mp4.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/epan/dissectors/file-mp4.c b/epan/dissectors/file-mp4.c
index e3c2d27442..911a4bc70a 100644
--- a/epan/dissectors/file-mp4.c
+++ b/epan/dissectors/file-mp4.c
@@ -217,15 +217,13 @@ dissect_mp4_mvhd_body(tvbuff_t *tvb, gint offset, gint len _U_,
rate = tvb_get_ntohs(tvb, offset);
fract_dec = tvb_get_ntohs(tvb, offset+2);
rate += make_fract(fract_dec);
- proto_tree_add_double_format_value(tree, hf_mp4_mvhd_rate,
- tvb, offset, 4, rate, "%f", rate);
+ proto_tree_add_double(tree, hf_mp4_mvhd_rate, tvb, offset, 4, rate);
offset += 4;
vol = tvb_get_guint8(tvb, offset);
fract_dec = tvb_get_guint8(tvb, offset+1);
vol += make_fract(fract_dec);
- proto_tree_add_double_format_value(tree, hf_mp4_mvhd_vol,
- tvb, offset, 4, vol, "%f", vol);
+ proto_tree_add_double(tree, hf_mp4_mvhd_vol, tvb, offset, 4, vol);
offset += 2;
offset += 2; /* 16 bits reserved */
@@ -314,15 +312,13 @@ dissect_mp4_tkhd_body(tvbuff_t *tvb, gint offset, gint len _U_,
width = tvb_get_ntohs(tvb, offset);
fract_dec = tvb_get_ntohs(tvb, offset+2);
width += make_fract(fract_dec);
- proto_tree_add_double_format_value(tree, hf_mp4_tkhd_width,
- tvb, offset, 4, width, "%f", width);
+ proto_tree_add_double(tree, hf_mp4_tkhd_width, tvb, offset, 4, width);
offset += 4;
height = tvb_get_ntohs(tvb, offset);
fract_dec = tvb_get_ntohs(tvb, offset+2);
height += make_fract(fract_dec);
- proto_tree_add_double_format_value(tree, hf_mp4_tkhd_height,
- tvb, offset, 4, height, "%f", height);
+ proto_tree_add_double(tree, hf_mp4_tkhd_height, tvb, offset, 4, height);
offset += 4;
return offset-offset_start;