summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-10-09 11:46:23 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-10-14 09:41:09 +0200
commit28782a377923c02597e62af8445e8175b5c58217 (patch)
treee4f52f4c804dfe599cadcdc9c75d2b56b018e031
parent9018e1b8d7fcf8d18f78e3fe1c39e52fed27aae0 (diff)
downloadgstreamer-plugins-bad-28782a377923c02597e62af8445e8175b5c58217.tar.gz
h265parse: expose parsed profile, tier and level to downstream
https://bugzilla.gnome.org/show_bug.cgi?id=732239
-rw-r--r--gst/videoparsers/gsth265parse.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c
index caf461691..269726836 100644
--- a/gst/videoparsers/gsth265parse.c
+++ b/gst/videoparsers/gsth265parse.c
@@ -1361,6 +1361,19 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
gst_buffer_replace (&h265parse->codec_data, NULL);
}
+ /* set profile and level in caps */
+ if (sps) {
+ GstMapInfo map;
+ GstBuffer *sps_buf = h265parse->sps_nals[sps->id];
+
+ if (sps_buf) {
+ gst_buffer_map (sps_buf, &map, GST_MAP_READ);
+ gst_codec_utils_h265_caps_set_level_tier_and_profile (caps,
+ map.data + 1, map.size - 1);
+ gst_buffer_unmap (sps_buf, &map);
+ }
+ }
+
gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (h265parse), caps);
}