Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4007>
return NULL;
}
- gst_buffer_pool_set_active (pool, TRUE);
+ if (!gst_buffer_pool_set_active (pool, TRUE)) {
+ GST_WARNING_OBJECT (self, "Failed to activate internal pool");
+ gst_object_unref (pool);
+ return NULL;
+ }
return pool;
}
gst_object_unref (allocator);
- gst_buffer_pool_set_active (base->priv->raw_pool, TRUE);
+ if (!gst_buffer_pool_set_active (base->priv->raw_pool, TRUE)) {
+ GST_WARNING_OBJECT (base, "Failed to activate sinkpad pool");
+ return NULL;
+ }
return base->priv->raw_pool;
}
{
GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
("Failed to reorder the input frame."), (NULL));
- gst_clear_buffer (&frame->output_buffer);
- gst_video_encoder_finish_frame (venc, frame);
+ if (frame) {
+ gst_clear_buffer (&frame->output_buffer);
+ gst_video_encoder_finish_frame (venc, frame);
+ }
return GST_FLOW_ERROR;
}
error_encode:
if (self->priv->sinkpad_caps) {
caps = self->priv->sinkpad_caps;
- gst_video_info_from_caps (&in_info, caps);
+ if (!gst_video_info_from_caps (&in_info, caps)) {
+ GST_ERROR_OBJECT (self, "Cannot parse caps %" GST_PTR_FORMAT, caps);
+ return NULL;
+ }
} else {
caps = self->in_caps;
in_info = self->in_info;
GST_ERROR_OBJECT (self, "Failed to create reconstruct pool");
goto error;
}
- gst_buffer_pool_set_active (recon_pool, TRUE);
+
+ if (!gst_buffer_pool_set_active (recon_pool, TRUE)) {
+ GST_ERROR_OBJECT (self, "Failed to activate reconstruct pool");
+ goto error;
+ }
status = vaCreateContext (dpy, config, coded_width, coded_height,
VA_PROGRESSIVE, NULL, 0, &context);
BitDepthC = 10;
MbWidthC = 8;
MbHeightC = 8;
+ break;
case VA_RT_FORMAT_YUV422_10:
BitDepthY = 10;
BitDepthC = 10;
MbWidthC = 8;
MbHeightC = 16;
+ break;
case VA_RT_FORMAT_YUV444_10:
BitDepthY = 10;
BitDepthC = 10;