diff options
author | Matthew Waters <ystreet00@gmail.com> | 2014-06-17 23:20:04 +1000 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-06-17 23:21:15 +1000 |
commit | 189353619c6faf11790d969b66e6866a0814e199 (patch) | |
tree | b00130b83cf78b198aa089cee1e5835127aeb5e9 /gst-libs/gst | |
parent | 19e8dbd6ac2c7d4c2022d8787441eb5e97fcaa6d (diff) | |
download | gstreamer-plugins-bad-189353619c6faf11790d969b66e6866a0814e199.tar.gz |
glframebuffer: don't segfault needlessly with GLES2
gst_gl_framebuffer_use_v2 was using a function that is not available
with GLES2
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/gl/gstglframebuffer.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c index 4d30a260e..2de236bca 100644 --- a/gst-libs/gst/gl/gstglframebuffer.c +++ b/gst-libs/gst/gl/gstglframebuffer.c @@ -296,9 +296,8 @@ gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width, gl->Viewport (0, 0, texture_fbo_width, texture_fbo_height); -#if GST_GL_HAVE_OPENGL - gl->DrawBuffer (GL_COLOR_ATTACHMENT0); -#endif + if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) + gl->DrawBuffer (GL_COLOR_ATTACHMENT0); gl->ClearColor (0.0, 0.0, 0.0, 0.0); gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -306,9 +305,8 @@ gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width, /* the opengl scene */ cb (stuff); -#if GST_GL_HAVE_OPENGL - gl->DrawBuffer (GL_NONE); -#endif + if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL) + gl->DrawBuffer (GL_NONE); gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2], viewport_dim[3]); |