Commit 4fc3db18 authored by Víctor Manuel Jáquez Leal's avatar Víctor Manuel Jáquez Leal Committed by Jan Schmidt
Browse files

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
parent d8c2dd2d
......@@ -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:");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment