libs: encoder: h265: bail if nal unit type fails
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Fri, 17 Feb 2017 00:19:00 +0000 (01:19 +0100)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Wed, 22 Feb 2017 04:19:06 +0000 (05:19 +0100)
Bail out if the NAL unit type is not recognized.

https://bugzilla.gnome.org/show_bug.cgi?id=778782

gst-libs/gst/vaapi/gstvaapiencoder_h265.c

index a838d97..b657e0d 100644 (file)
@@ -1625,7 +1625,8 @@ fill_picture (GstVaapiEncoderH265 * encoder, GstVaapiEncPicture * picture,
   pic_param->num_ref_idx_l1_default_active_minus1 =
       (ref_pool->max_reflist1_count ? (ref_pool->max_reflist1_count - 1) : 0);
 
-  get_nal_unit_type (picture, &nal_unit_type);
+  if (!get_nal_unit_type (picture, &nal_unit_type))
+    return FALSE;
   pic_param->nal_unit_type = nal_unit_type;
 
   /* set picture fields */