mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
gl/color: pass large value by reference
Coverity 1199700
This commit is contained in:
parent
01c15547d4
commit
a05d62d5ca
4 changed files with 18 additions and 12 deletions
|
@ -461,12 +461,18 @@ gst_gl_color_convert_finalize (GObject * object)
|
|||
|
||||
static gboolean
|
||||
_gst_gl_color_convert_init_format_unlocked (GstGLColorConvert * convert,
|
||||
GstVideoInfo in_info, GstVideoInfo out_info)
|
||||
GstVideoInfo * in_info, GstVideoInfo * out_info)
|
||||
{
|
||||
g_return_val_if_fail (convert != NULL, FALSE);
|
||||
g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (&in_info) !=
|
||||
g_return_val_if_fail (in_info, FALSE);
|
||||
g_return_val_if_fail (out_info, FALSE);
|
||||
g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (in_info) !=
|
||||
GST_VIDEO_FORMAT_UNKNOWN, FALSE);
|
||||
g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (&in_info) !=
|
||||
g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (in_info) !=
|
||||
GST_VIDEO_FORMAT_ENCODED, FALSE);
|
||||
g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (out_info) !=
|
||||
GST_VIDEO_FORMAT_UNKNOWN, FALSE);
|
||||
g_return_val_if_fail (GST_VIDEO_INFO_FORMAT (out_info) !=
|
||||
GST_VIDEO_FORMAT_ENCODED, FALSE);
|
||||
|
||||
if (convert->initted) {
|
||||
|
@ -475,8 +481,8 @@ _gst_gl_color_convert_init_format_unlocked (GstGLColorConvert * convert,
|
|||
convert->initted = TRUE;
|
||||
}
|
||||
|
||||
convert->in_info = in_info;
|
||||
convert->out_info = out_info;
|
||||
convert->in_info = *in_info;
|
||||
convert->out_info = *out_info;
|
||||
|
||||
gst_gl_context_thread_add (convert->context,
|
||||
(GstGLContextThreadFunc) _init_convert, convert);
|
||||
|
@ -496,7 +502,7 @@ _gst_gl_color_convert_init_format_unlocked (GstGLColorConvert * convert,
|
|||
*/
|
||||
gboolean
|
||||
gst_gl_color_convert_init_format (GstGLColorConvert * convert,
|
||||
GstVideoInfo in_info, GstVideoInfo out_info)
|
||||
GstVideoInfo * in_info, GstVideoInfo * out_info)
|
||||
{
|
||||
gboolean ret;
|
||||
|
||||
|
|
|
@ -102,8 +102,8 @@ struct _GstGLColorConvertClass
|
|||
GstGLColorConvert * gst_gl_color_convert_new (GstGLContext * context);
|
||||
|
||||
gboolean gst_gl_color_convert_init_format (GstGLColorConvert * convert,
|
||||
GstVideoInfo in_info,
|
||||
GstVideoInfo out_info);
|
||||
GstVideoInfo * in_info,
|
||||
GstVideoInfo * out_info);
|
||||
|
||||
void gst_gl_color_convert_set_texture_scaling (GstGLColorConvert * convert,
|
||||
gfloat scaling[GST_VIDEO_MAX_PLANES][2]);
|
||||
|
|
|
@ -339,8 +339,8 @@ _init_download (GstGLContext * context, GstGLDownload * download)
|
|||
out_height);
|
||||
|
||||
download->priv->result =
|
||||
gst_gl_color_convert_init_format (download->convert, in_info,
|
||||
download->info);
|
||||
gst_gl_color_convert_init_format (download->convert, &in_info,
|
||||
&download->info);
|
||||
if (!download->priv->result)
|
||||
return;
|
||||
|
||||
|
|
|
@ -590,8 +590,8 @@ _init_upload (GstGLContext * context, GstGLUpload * upload)
|
|||
GST_VIDEO_INFO_WIDTH (&upload->in_info),
|
||||
GST_VIDEO_INFO_HEIGHT (&upload->in_info));
|
||||
|
||||
if (!gst_gl_color_convert_init_format (upload->convert, upload->in_info,
|
||||
out_info))
|
||||
if (!gst_gl_color_convert_init_format (upload->convert, &upload->in_info,
|
||||
&out_info))
|
||||
goto error;
|
||||
|
||||
upload->priv->result = TRUE;
|
||||
|
|
Loading…
Reference in a new issue