diff options
author | Matthew Waters <ystreet00@gmail.com> | 2014-04-02 22:43:41 +1100 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-04-02 22:43:41 +1100 |
commit | 5b0da41038ec54ec7ccfcd2b5bb06ed74175842b (patch) | |
tree | 2e59285daa73fedb902306ad6294f1200d18573f /ext/gl/gstglvideomixer.c | |
parent | e58cd96b96df15574004716647fb72dc06a89b01 (diff) | |
download | gstreamer-plugins-bad-5b0da41038ec54ec7ccfcd2b5bb06ed74175842b.tar.gz |
gl: fix assignment of temporary variables
Diffstat (limited to 'ext/gl/gstglvideomixer.c')
-rw-r--r-- | ext/gl/gstglvideomixer.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c index d72f83ba7..1e10bf3be 100644 --- a/ext/gl/gstglvideomixer.c +++ b/ext/gl/gstglvideomixer.c @@ -221,22 +221,30 @@ gst_gl_video_mixer_callback (gpointer stuff) while (count < video_mixer->input_frames->len) { GstGLMixerFrameData *frame; - GLfloat *v_vertices; + /* *INDENT-OFF* */ + gfloat v_vertices = { + /* front face */ + -1.0,-1.0,-1.0f, 0.0f, 0.0f, + 1.0,-1.0,-1.0f, 1.0f, 0.0f, + 1.0, 1.0,-1.0f, 1.0f, 1.0f, + -1.0, 1.0,-1.0f, 0.0f, 1.0f, + }; + /* *INDENT-ON* */ guint in_tex; guint in_width, in_height; gfloat w, h; frame = g_ptr_array_index (video_mixer->input_frames, count); - in_tex = frame->texture; in_width = GST_VIDEO_INFO_WIDTH (&frame->pad->in_info); in_height = GST_VIDEO_INFO_HEIGHT (&frame->pad->in_info); - if (!frame || !in_tex || in_width <= 0 || in_height <= 0) { + if (!frame || !frame->texture || in_width <= 0 || in_height <= 0) { GST_DEBUG ("skipping texture:%u frame:%p width:%u height %u", in_tex, frame, in_width, in_height); count++; continue; } + in_tex = frame->texture; GST_TRACE ("processing texture:%u dimensions:%ux%u", in_tex, in_width, in_height); @@ -246,20 +254,6 @@ gst_gl_video_mixer_callback (gpointer stuff) GST_TRACE ("processing texture:%u dimensions:%ux%u, %fx%f", in_tex, in_width, in_height, w, h); - /* *INDENT-OFF* */ - v_vertices = (GLfloat[]) { - /* front face */ - -1.0, -1.0, -1.0f, - 0.0f, 0.0f, - 1.0, -1.0, -1.0f, - 1.0f, 0.0f, - 1.0, 1.0, -1.0f, - 1.0f, 1.0f, - -1.0, 1.0, -1.0f, - 0.0f, 1.0f, - }; - /* *INDENT-ON* */ - gl->VertexAttribPointer (attr_position_loc, 3, GL_FLOAT, GL_FALSE, 5 * sizeof (GLfloat), &v_vertices[0]); |