libs: encoder: h264, h265, mpeg2: remove assert

Remove spurious asserts for misc parameters. If they cannot be
allocated, FALSE is already returned.
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-06-02 16:28:30 +02:00
parent 37b81a7b69
commit 5c05a8b436
3 changed files with 0 additions and 5 deletions

View file

@ -2164,7 +2164,6 @@ ensure_misc_params (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture)
/* HRD params */
misc = GST_VAAPI_ENC_MISC_PARAM_NEW (HRD, encoder);
g_assert (misc);
if (!misc)
return FALSE;
fill_hrd_params (encoder, misc->data);
@ -2175,7 +2174,6 @@ ensure_misc_params (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture)
if (GST_VAAPI_ENCODER_RATE_CONTROL (encoder) == GST_VAAPI_RATECONTROL_CBR ||
GST_VAAPI_ENCODER_RATE_CONTROL (encoder) == GST_VAAPI_RATECONTROL_VBR) {
misc = GST_VAAPI_ENC_MISC_PARAM_NEW (RateControl, encoder);
g_assert (misc);
if (!misc)
return FALSE;
rate_control = misc->data;

View file

@ -1774,7 +1774,6 @@ ensure_misc_params (GstVaapiEncoderH265 * encoder, GstVaapiEncPicture * picture)
/* HRD params for rate control */
if (GST_VAAPI_ENCODER_RATE_CONTROL (encoder) == GST_VAAPI_RATECONTROL_CBR) {
misc = GST_VAAPI_ENC_MISC_PARAM_NEW (HRD, encoder);
g_assert (misc);
if (!misc)
return FALSE;
fill_hrd_params (encoder, misc->data);

View file

@ -462,7 +462,6 @@ set_misc_parameters (GstVaapiEncoderMpeg2 * encoder,
/* add hrd */
misc = GST_VAAPI_ENC_MISC_PARAM_NEW (HRD, encoder);
g_assert (misc);
if (!misc)
return FALSE;
gst_vaapi_enc_picture_add_misc_param (picture, misc);
@ -479,7 +478,6 @@ set_misc_parameters (GstVaapiEncoderMpeg2 * encoder,
/* add ratecontrol */
if (GST_VAAPI_ENCODER_RATE_CONTROL (encoder) == GST_VAAPI_RATECONTROL_CBR) {
misc = GST_VAAPI_ENC_MISC_PARAM_NEW (RateControl, encoder);
g_assert (misc);
if (!misc)
return FALSE;
gst_vaapi_enc_picture_add_misc_param (picture, misc);