From 2817472b9ede1034d9592ccea524fc0103bc5b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 9 Oct 2014 11:46:23 +0300 Subject: [PATCH] h265parse: expose parsed profile, tier and level to downstream https://bugzilla.gnome.org/show_bug.cgi?id=732239 --- gst/videoparsers/gsth265parse.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index fa4ad50e6b..70ddba95e5 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -1359,6 +1359,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); }