From 4fc3db1808bf910733902ac95bae2a2049de0627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 19 Jan 2015 17:31:26 +0100 Subject: [PATCH] h264parse: parse SPS subset This patch calls gst_h264_parser_parse_subset_sps() when a SPS subset NAL type is found. All the bits required for parsing the SPS subset in NALs were already there, just we need to call them when the this NAL type is found. With this parsing, the number of views (minus 1) attribute is filled, which was a requirement for negotiating the stereo-high profile. https://bugzilla.gnome.org/show_bug.cgi?id=743174 --- gst/videoparsers/gsth264parse.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index d14a1f19c8..fa72a94962 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -472,13 +472,16 @@ static const gchar *nal_names[] = { "AU delimiter", "Sequence End", "Stream End", - "Filler Data" + "Filler Data", + "SPS extension", + "Prefix", + "SPS Subset" }; static const gchar * _nal_name (GstH264NalUnitType nal_type) { - if (nal_type <= GST_H264_NAL_FILLER_DATA) + if (nal_type <= GST_H264_NAL_SUBSET_SPS) return nal_names[nal_type]; return "Invalid"; } @@ -574,14 +577,15 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu) case GST_H264_NAL_SUBSET_SPS: if (!GST_H264_PARSE_STATE_VALID (h264parse, GST_H264_PARSE_STATE_GOT_SPS)) return FALSE; + pres = gst_h264_parser_parse_subset_sps (nalparser, nalu, &sps, TRUE); goto process_sps; case GST_H264_NAL_SPS: /* reset state, everything else is obsolete */ h264parse->state = 0; + pres = gst_h264_parser_parse_sps (nalparser, nalu, &sps, TRUE); process_sps: - pres = gst_h264_parser_parse_sps (nalparser, nalu, &sps, TRUE); /* arranged for a fallback sps.id, so use that one and only warn */ if (pres != GST_H264_PARSER_OK) { GST_WARNING_OBJECT (h264parse, "failed to parse SPS:");