summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2014-10-09 01:18:16 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-10-09 11:46:18 +0300
commitb1a286cd7c6b1a4bc6a8e81cac79aa3ccd5ff523 (patch)
treebf28dfad156d021fe4f9530ea7c6fa095a6f34ad
parent014cbbbb337527d7067d4349cc5a0abea805dc88 (diff)
h264parse: expose parsed profile and level to downstream
Set parsed profile and level in src caps. https://bugzilla.gnome.org/show_bug.cgi?id=732239
-rw-r--r--gst/videoparsers/gsth264parse.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index 89b33d569..6c4a146e8 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -1364,6 +1364,19 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
gst_buffer_replace (&h264parse->codec_data, NULL);
}
+ /* set profile and level in caps */
+ if (sps) {
+ GstMapInfo map;
+ GstBuffer *sps_buf = h264parse->sps_nals[sps->id];
+
+ if (sps_buf) {
+ gst_buffer_map (sps_buf, &map, GST_MAP_READ);
+ gst_codec_utils_h264_caps_set_level_and_profile (caps,
+ map.data + 1, map.size - 1);
+ gst_buffer_unmap (sps_buf, &map);
+ }
+ }
+
gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (h264parse), caps);
}