diff options
Diffstat (limited to 'asn1/mpeg-pes/packet-mpeg-pes-template.c')
-rw-r--r-- | asn1/mpeg-pes/packet-mpeg-pes-template.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/asn1/mpeg-pes/packet-mpeg-pes-template.c b/asn1/mpeg-pes/packet-mpeg-pes-template.c index 60bce351b7..44d019e3fb 100644 --- a/asn1/mpeg-pes/packet-mpeg-pes-template.c +++ b/asn1/mpeg-pes/packet-mpeg-pes-template.c @@ -207,12 +207,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; @@ -221,12 +219,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; @@ -364,10 +360,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, @@ -393,6 +387,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 */ @@ -404,11 +399,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) @@ -422,12 +415,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); |