diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-09-10 13:41:16 -0400 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-09-14 21:27:19 +0000 |
commit | a1491c7777f2e6d3737fa0049c2e46a0a244b52a (patch) | |
tree | e9a34ff73dfaf6407a30b275ab5b4ee2da89f2ab /asn1 | |
parent | 50893c96155a4f77813357983bea1c5941fd61c1 (diff) | |
download | wireshark-a1491c7777f2e6d3737fa0049c2e46a0a244b52a.tar.gz wireshark-a1491c7777f2e6d3737fa0049c2e46a0a244b52a.tar.bz2 wireshark-a1491c7777f2e6d3737fa0049c2e46a0a244b52a.zip |
MPEG-PES: tell the user (in COL_INFO) when the stream or frame type is unknown.
Inspired by: https://www.wireshark.org/lists/wireshark-users/201508/msg00023.html
Change-Id: Ib632b79aef5cbb4c83965a276ec955be43493455
Reviewed-on: https://code.wireshark.org/review/10472
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/mpeg-pes/packet-mpeg-pes-template.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/asn1/mpeg-pes/packet-mpeg-pes-template.c b/asn1/mpeg-pes/packet-mpeg-pes-template.c index 01e4f43ffc..98147d3bcf 100644 --- a/asn1/mpeg-pes/packet-mpeg-pes-template.c +++ b/asn1/mpeg-pes/packet-mpeg-pes-template.c @@ -374,7 +374,6 @@ 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 */ @@ -386,9 +385,7 @@ 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); - s = try_val_to_str(stream, mpeg_pes_T_stream_vals); - if (s != NULL) - col_set_str(pinfo->cinfo, COL_INFO, s); + col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(stream, mpeg_pes_T_stream_vals, "Unknown stream: %d")); #if 0 if (tree == NULL) @@ -402,9 +399,7 @@ 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; - s = try_val_to_str(frame_type, mpeg_pes_T_frame_type_vals); - if (s != NULL) - col_set_str(pinfo->cinfo, COL_INFO, s); + col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(frame_type, mpeg_pes_T_frame_type_vals, "Unknown frame type: %d")); offset = dissect_mpeg_pes_Picture(tvb, offset, &asn1_ctx, tree, hf_mpeg_video_picture); |