libs: encoder: h265: bail if nal unit type fails

Bail out if the NAL unit type is not recognized.

https://bugzilla.gnome.org/show_bug.cgi?id=778782
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-02-17 01:19:00 +01:00
parent d6738f3f93
commit 7b3a51f145

View file

@ -1625,7 +1625,8 @@ fill_picture (GstVaapiEncoderH265 * encoder, GstVaapiEncPicture * picture,
pic_param->num_ref_idx_l1_default_active_minus1 = pic_param->num_ref_idx_l1_default_active_minus1 =
(ref_pool->max_reflist1_count ? (ref_pool->max_reflist1_count - 1) : 0); (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; pic_param->nal_unit_type = nal_unit_type;
/* set picture fields */ /* set picture fields */