mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
[465/906] gl: Fix variable unused but set compiler warnings
This commit is contained in:
parent
b1166ed0c4
commit
4732eb4d68
2 changed files with 16 additions and 18 deletions
|
@ -168,7 +168,7 @@ gst_gl_bumper_init_resources (GstGLFilter * filter)
|
|||
guchar *raw_data = NULL;
|
||||
guchar **rows = NULL;
|
||||
png_byte magic[8];
|
||||
gint n_read = 0;
|
||||
gint n_read;
|
||||
|
||||
if (!filter->display)
|
||||
return;
|
||||
|
@ -180,6 +180,10 @@ gst_gl_bumper_init_resources (GstGLFilter * filter)
|
|||
|
||||
/* Read magic number */
|
||||
n_read = fread (magic, 1, sizeof (magic), fp);
|
||||
if (n_read != sizeof (magic)) {
|
||||
fclose (fp);
|
||||
LOAD_ERROR ("can't read PNG magic number");
|
||||
}
|
||||
|
||||
/* Check for valid magic number */
|
||||
if (png_sig_cmp (magic, 0, sizeof (magic))) {
|
||||
|
|
|
@ -80,8 +80,7 @@ static GstStaticPadTemplate gst_gl_download_src_pad_template =
|
|||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (
|
||||
GST_VIDEO_CAPS_RGB ";"
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB ";"
|
||||
GST_VIDEO_CAPS_RGBx ";"
|
||||
GST_VIDEO_CAPS_RGBA ";"
|
||||
GST_VIDEO_CAPS_BGR ";"
|
||||
|
@ -98,11 +97,9 @@ static GstStaticPadTemplate gst_gl_download_src_pad_template =
|
|||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (
|
||||
GST_VIDEO_CAPS_RGB ";"
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB ";"
|
||||
GST_VIDEO_CAPS_RGBx ";"
|
||||
GST_VIDEO_CAPS_RGBA ";"
|
||||
GST_VIDEO_CAPS_YUV ("{ YUY2, UYVY, AYUV }"))
|
||||
GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_YUV ("{ YUY2, UYVY, AYUV }"))
|
||||
);
|
||||
#endif
|
||||
|
||||
|
@ -229,7 +226,8 @@ gst_gl_download_src_query (GstPad * pad, GstQuery * query)
|
|||
case GST_QUERY_CUSTOM:
|
||||
{
|
||||
GstStructure *structure = gst_query_get_structure (query);
|
||||
gst_structure_set (structure, "gstgldisplay", G_TYPE_POINTER, download->display, NULL);
|
||||
gst_structure_set (structure, "gstgldisplay", G_TYPE_POINTER,
|
||||
download->display, NULL);
|
||||
res = gst_pad_query_default (pad, query);
|
||||
break;
|
||||
}
|
||||
|
@ -276,7 +274,6 @@ static GstCaps *
|
|||
gst_gl_download_transform_caps (GstBaseTransform * bt,
|
||||
GstPadDirection direction, GstCaps * caps)
|
||||
{
|
||||
GstGLDownload *download;
|
||||
GstStructure *structure;
|
||||
GstCaps *newcaps, *newothercaps;
|
||||
GstStructure *newstruct;
|
||||
|
@ -285,8 +282,6 @@ gst_gl_download_transform_caps (GstBaseTransform * bt,
|
|||
const GValue *framerate_value;
|
||||
const GValue *par_value;
|
||||
|
||||
download = GST_GL_DOWNLOAD (bt);
|
||||
|
||||
GST_DEBUG ("transform caps %" GST_PTR_FORMAT, caps);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
@ -350,7 +345,6 @@ gst_gl_download_set_caps (GstBaseTransform * bt, GstCaps * incaps,
|
|||
GST_ERROR ("display is null");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//blocking call, init color space conversion if needed
|
||||
gst_gl_display_init_download (download->display, download->video_format,
|
||||
download->width, download->height);
|
||||
|
|
Loading…
Reference in a new issue