aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sdp.c
diff options
context:
space:
mode:
authorAsaf Kave <kaveasaf@gmail.com>2018-07-16 14:23:50 +0300
committerPascal Quantin <pascal.quantin@gmail.com>2018-07-18 08:33:35 +0000
commit8bb54d7a61aac136999ca3b8d527eb873998c526 (patch)
tree5ecb351b55d71ae271ca56f3a6050b89243661a8 /epan/dissectors/packet-sdp.c
parent9795cc02854827ac12f1769eb5f5127b03deb0ed (diff)
H.265: Parsing media format specific parameter from SDP.
Change-Id: I2607068671f370517b1f0a2f65f47a221b630d91 Reviewed-on: https://code.wireshark.org/review/28725 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-sdp.c')
-rw-r--r--epan/dissectors/packet-sdp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c
index b92df903a0..6272291686 100644
--- a/epan/dissectors/packet-sdp.c
+++ b/epan/dissectors/packet-sdp.c
@@ -41,6 +41,7 @@
#include "packet-sprt.h"
#include "packet-h245.h"
#include "packet-h264.h"
+#include "packet-h265.h"
#include "packet-mp4ves.h"
void proto_register_sdp(void);
@@ -51,6 +52,7 @@ static dissector_handle_t rtcp_handle;
static dissector_handle_t sprt_handle;
static dissector_handle_t msrp_handle;
static dissector_handle_t h264_handle;
+static dissector_handle_t h265_handle;
static dissector_handle_t mp4ves_config_handle;
static int sdp_tap = -1;
@@ -1419,6 +1421,24 @@ decode_sdp_fmtp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset
}
}
+ /* Dissect the H265
+ * RFC 7798:
+ */
+ else if ((mime_type != NULL) && (g_ascii_strcasecmp(mime_type, "H265") == 0)) {
+ if (strcmp(field_name, "sprop-vps") == 0 || strcmp(field_name, "sprop-sps") == 0 || strcmp(field_name, "sprop-pps") == 0) {
+
+ /* Move past '=' */
+ offset++;
+ tokenlen = end_offset - offset;
+ format_specific_parameter = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tokenlen, ENC_UTF_8 | ENC_NA);
+ data_tvb = base64_to_tvb(tvb, format_specific_parameter);
+ add_new_data_source(pinfo, data_tvb, field_name);
+ if (h265_handle && data_tvb) {
+ dissect_h265_format_specific_parameter(tree, data_tvb, pinfo);
+ }
+ }
+ }
+
}
static const string_string ice_candidate_types[] = {
@@ -3332,6 +3352,7 @@ proto_reg_handoff_sdp(void)
msrp_handle = find_dissector_add_dependency("msrp", proto_sdp);
sprt_handle = find_dissector_add_dependency("sprt", proto_sdp);
h264_handle = find_dissector_add_dependency("h264", proto_sdp);
+ h265_handle = find_dissector_add_dependency("h265", proto_sdp);
mp4ves_config_handle = find_dissector_add_dependency("mp4ves_config", proto_sdp);
proto_sprt = dissector_handle_get_protocol_index(find_dissector("sprt"));