h265parser: parse extra profile fields

Those fields have been introduced in version 2 and later to define new
profiles like the format range extensions profiles (A.3.5).

NOTE: This patch breaks the parser ABI, rebuild needed.

https://bugzilla.gnome.org/show_bug.cgi?id=793876
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c
index 0b2d68c..01f9d58 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.c
+++ b/gst-libs/gst/codecparsers/gsth265parser.c
@@ -264,8 +264,19 @@
   READ_UINT8 (nr, ptl->non_packed_constraint_flag, 1);
   READ_UINT8 (nr, ptl->frame_only_constraint_flag, 1);
 
+  READ_UINT8 (nr, ptl->max_12bit_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->max_10bit_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->max_8bit_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->max_422chroma_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->max_420chroma_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->max_monochrome_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->intra_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->one_picture_only_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->lower_bit_rate_constraint_flag, 1);
+  READ_UINT8 (nr, ptl->max_14bit_constraint_flag, 1);
+
   /* skip the reserved zero bits */
-  if (!nal_reader_skip (nr, 44))
+  if (!nal_reader_skip (nr, 34))
     goto error;
 
   READ_UINT8 (nr, ptl->level_idc, 8);
diff --git a/gst-libs/gst/codecparsers/gsth265parser.h b/gst-libs/gst/codecparsers/gsth265parser.h
index 8fa807a..45c5e54 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.h
+++ b/gst-libs/gst/codecparsers/gsth265parser.h
@@ -316,6 +316,16 @@
  * @non_packed_constraint_flag: indicate the presence of frame packing
  *   arragement sei message
  * @frame_only_constraint_flag: recognize the field_seq_flag
+ * @max_12bit_constraint_flag: used to define profile extensions, see Annex A
+ * @max_10bit_constraint_flag: used to define profile extensions, see Annex A
+ * @max_8bit_constraint_flag: used to define profile extensions, see Annex A
+ * @max_422chroma_constraint_flag: used to define profile extensions, see Annex A
+ * @max_420chroma_constraint_flag: used to define profile extensions, see Annex A
+ * @max_monochrome_constraint_flag: used to define profile extensions, see Annex A
+ * @intra_constraint_flag: used to define profile extensions, see Annex A
+ * @one_picture_only_constraint_flag: used to define profile extensions, see Annex A
+ * @lower_bit_rate_constraint_flag: used to define profile extensions, see Annex A
+ * @max_14bit_constraint_flag: used to define profile extensions, see Annex A
  * @level idc: indicate the level which the CVS confirms
  * @sub_layer_profile_present_flag: sublayer profile presence ind
  * @sub_layer_level_present_flag:sublayer level presence indicator.
@@ -344,6 +354,18 @@
   guint8 interlaced_source_flag;
   guint8 non_packed_constraint_flag;
   guint8 frame_only_constraint_flag;
+
+  guint8 max_12bit_constraint_flag;
+  guint8 max_10bit_constraint_flag;
+  guint8 max_8bit_constraint_flag;
+  guint8 max_422chroma_constraint_flag;
+  guint8 max_420chroma_constraint_flag;
+  guint8 max_monochrome_constraint_flag;
+  guint8 intra_constraint_flag;
+  guint8 one_picture_only_constraint_flag;
+  guint8 lower_bit_rate_constraint_flag;
+  guint8 max_14bit_constraint_flag;
+
   guint8 level_idc;
 
   guint8 sub_layer_profile_present_flag[6];