aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mpeg-pes.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-06-14 12:44:50 +0000
committerMichael Mann <mmann78@netscape.net>2013-06-14 12:44:50 +0000
commit2dbf6c59a2f5d99d3dc8ea3d2ffa409ef2eb611a (patch)
treec021a26288d3d501a3dbb8de190cdc6a8e40ffa1 /epan/dissectors/packet-mpeg-pes.c
parent875040ec1e304110b2a7f1a6e9ead855d3be2e6f (diff)
Remove check_col() from ASN.1 dissectors
svn path=/trunk/; revision=49927
Diffstat (limited to 'epan/dissectors/packet-mpeg-pes.c')
-rw-r--r--epan/dissectors/packet-mpeg-pes.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/epan/dissectors/packet-mpeg-pes.c b/epan/dissectors/packet-mpeg-pes.c
index 4847b7146e..445eb66ef8 100644
--- a/epan/dissectors/packet-mpeg-pes.c
+++ b/epan/dissectors/packet-mpeg-pes.c
@@ -648,12 +648,10 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
offset, 5, &nst);
offset += 5;
- if (check_col(pinfo->cinfo, COL_DEF_DST)) {
- SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL);
- col_add_fstr(pinfo->cinfo, COL_DEF_DST,
+ SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL);
+ col_add_fstr(pinfo->cinfo, COL_DEF_DST,
"PTS %ld.%09u",
(long) nst.secs, nst.nsecs);
- }
}
if (flags & DTS_FLAG) {
nstime_t nst;
@@ -662,12 +660,10 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
offset, 5, &nst);
offset += 5;
- if (check_col(pinfo->cinfo, COL_DEF_SRC)) {
- SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
- col_add_fstr(pinfo->cinfo, COL_DEF_SRC,
+ SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
+ col_add_fstr(pinfo->cinfo, COL_DEF_SRC,
"DTS %ld.%09u",
(long) nst.secs, nst.nsecs);
- }
}
if (flags & ESCR_FLAG) {
nstime_t nst;
@@ -805,10 +801,8 @@ dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset,
program_mux_rate);
offset += 3 * 8;
- if (check_col(pinfo->cinfo, COL_DEF_SRC)) {
- SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
- col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "%u B/s", program_mux_rate);
- }
+ SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
+ col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "%u B/s", program_mux_rate);
stuffing_length = tvb_get_guint8(tvb, offset / 8) & 0x07;
proto_tree_add_item(tree, hf_mpeg_pes_stuffing_length, tvb,
@@ -834,6 +828,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
int stream;
asn1_ctx_t asn1_ctx;
gint offset = 0;
+ const char *s;
if (!tvb_bytes_exist(tvb, 0, 3))
return FALSE; /* not enough bytes for a PES prefix */
@@ -845,11 +840,9 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
col_clear(pinfo->cinfo, COL_INFO);
stream = tvb_get_guint8(tvb, 3);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- const char *s = try_val_to_str(stream, mpeg_pes_T_stream_vals);
- if (s != NULL)
- col_set_str(pinfo->cinfo, COL_INFO, s);
- }
+ s = try_val_to_str(stream, mpeg_pes_T_stream_vals);
+ if (s != NULL)
+ col_set_str(pinfo->cinfo, COL_INFO, s);
#if 0
if (tree == NULL)
@@ -863,12 +856,9 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
int frame_type;
frame_type = tvb_get_guint8(tvb, 5) >> 3 & 0x07;
- if (check_col(pinfo->cinfo, COL_INFO)) {
- const char *s = try_val_to_str(frame_type,
- mpeg_pes_T_frame_type_vals);
- if (s != NULL)
- col_set_str(pinfo->cinfo, COL_INFO, s);
- }
+ s = try_val_to_str(frame_type, mpeg_pes_T_frame_type_vals);
+ if (s != NULL)
+ col_set_str(pinfo->cinfo, COL_INFO, s);
offset = dissect_mpeg_pes_Picture(tvb, offset, &asn1_ctx,
tree, hf_mpeg_video_picture);
@@ -1210,7 +1200,7 @@ proto_register_mpeg_pes(void)
"BIT_STRING_SIZE_16", HFILL }},
/*--- End of included file: packet-mpeg-pes-hfarr.c ---*/
-#line 568 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
+#line 558 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
{ &hf_mpeg_pes_pack_header,
{ "Pack header", "mpeg-pes.pack",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
@@ -1328,7 +1318,7 @@ proto_register_mpeg_pes(void)
&ett_mpeg_pes_Picture,
/*--- End of included file: packet-mpeg-pes-ettarr.c ---*/
-#line 675 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
+#line 665 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
&ett_mpeg_pes_pack_header,
&ett_mpeg_pes_header_data,
&ett_mpeg_pes_trick_mode