diff options
author | Matthew Waters <ystreet00@gmail.com> | 2013-09-24 16:37:11 +1000 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-03-15 18:37:02 +0100 |
commit | 225d37284705b22696e41657d291d080b2c03ca3 (patch) | |
tree | 936baa8b229b86e92881fb93b903cb41488fa96b /gst | |
parent | e29d826b0a08f93c7dfcc7d7e3e188d473c4bfc0 (diff) | |
download | gstreamer-plugins-bad-225d37284705b22696e41657d291d080b2c03ca3.tar.gz |
[817/906] make the state change test pass
Diffstat (limited to 'gst')
-rw-r--r-- | gst/gl/gstglbumper.c | 4 | ||||
-rw-r--r-- | gst/gl/gstgldeinterlace.c | 4 | ||||
-rw-r--r-- | gst/gl/gstglfilterblur.c | 8 | ||||
-rw-r--r-- | gst/gl/gstglfiltercube.c | 1 | ||||
-rw-r--r-- | gst/gl/gstglfilterglass.c | 9 | ||||
-rw-r--r-- | gst/gl/gstglfilterlaplacian.c | 4 | ||||
-rw-r--r-- | gst/gl/gstglfiltershader.c | 5 | ||||
-rw-r--r-- | gst/gl/gstglfiltersobel.c | 19 | ||||
-rw-r--r-- | gst/gl/gstglmosaic.c | 4 |
9 files changed, 44 insertions, 14 deletions
diff --git a/gst/gl/gstglbumper.c b/gst/gl/gstglbumper.c index 0643b380d..e555c47c4 100644 --- a/gst/gl/gstglbumper.c +++ b/gst/gl/gstglbumper.c @@ -313,7 +313,9 @@ gst_gl_bumper_reset (GstGLFilter * filter) GstGLBumper *bumper_filter = GST_GL_BUMPER (filter); //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, bumper_filter->shader); + if (bumper_filter->shader) + gst_gl_context_del_shader (filter->context, bumper_filter->shader); + bumper_filter->shader = NULL; } static void diff --git a/gst/gl/gstgldeinterlace.c b/gst/gl/gstgldeinterlace.c index 6604551ba..c2b7fce9e 100644 --- a/gst/gl/gstgldeinterlace.c +++ b/gst/gl/gstgldeinterlace.c @@ -189,7 +189,9 @@ gst_gl_deinterlace_reset (GstGLFilter * filter) deinterlace_filter->prev_buffer = NULL; } //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, deinterlace_filter->shader); + if (deinterlace_filter->shader) + gst_gl_context_del_shader (filter->context, deinterlace_filter->shader); + deinterlace_filter->shader = NULL; } static void diff --git a/gst/gl/gstglfilterblur.c b/gst/gl/gstglfilterblur.c index 8d9c933a1..193d6c1e2 100644 --- a/gst/gl/gstglfilterblur.c +++ b/gst/gl/gstglfilterblur.c @@ -138,10 +138,14 @@ gst_gl_filter_filterblur_reset (GstGLFilter * filter) GstGLFilterBlur *filterblur = GST_GL_FILTERBLUR (filter); //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, filterblur->shader0); + if (filterblur->shader0) + gst_gl_context_del_shader (filter->context, filterblur->shader0); + filterblur->shader0 = NULL; //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, filterblur->shader1); + if (filterblur->shader1) + gst_gl_context_del_shader (filter->context, filterblur->shader1); + filterblur->shader1 = NULL; } static void diff --git a/gst/gl/gstglfiltercube.c b/gst/gl/gstglfiltercube.c index cca61fe54..357b0cd10 100644 --- a/gst/gl/gstglfiltercube.c +++ b/gst/gl/gstglfiltercube.c @@ -288,6 +288,7 @@ gst_gl_filter_cube_reset (GstGLFilter * filter) /* blocking call, wait the opengl thread has destroyed the shader */ if (cube_filter->shader) gst_gl_context_del_shader (filter->context, cube_filter->shader); + cube_filter->shader = NULL; } static gboolean diff --git a/gst/gl/gstglfilterglass.c b/gst/gl/gstglfilterglass.c index 19b7644d3..8680434b3 100644 --- a/gst/gl/gstglfilterglass.c +++ b/gst/gl/gstglfilterglass.c @@ -180,8 +180,13 @@ gst_gl_filter_glass_reset (GstGLFilter * filter) GstGLFilterGlass *glass_filter = GST_GL_FILTER_GLASS (filter); //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, glass_filter->shader); - gst_gl_context_del_shader (filter->context, glass_filter->passthrough_shader); + if (glass_filter->shader) + gst_gl_context_del_shader (filter->context, glass_filter->shader); + glass_filter->shader = NULL; + if (glass_filter->passthrough_shader) + gst_gl_context_del_shader (filter->context, + glass_filter->passthrough_shader); + glass_filter->passthrough_shader = NULL; } static void diff --git a/gst/gl/gstglfilterlaplacian.c b/gst/gl/gstglfilterlaplacian.c index 087938984..850ffdd12 100644 --- a/gst/gl/gstglfilterlaplacian.c +++ b/gst/gl/gstglfilterlaplacian.c @@ -131,7 +131,9 @@ gst_gl_filter_laplacian_reset (GstGLFilter * filter) GstGLFilterLaplacian *laplacian_filter = GST_GL_FILTER_LAPLACIAN (filter); //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, laplacian_filter->shader); + if (laplacian_filter->shader) + gst_gl_context_del_shader (filter->context, laplacian_filter->shader); + laplacian_filter->shader = NULL; } static void diff --git a/gst/gl/gstglfiltershader.c b/gst/gl/gstglfiltershader.c index ab6f3416d..ad9b3439f 100644 --- a/gst/gl/gstglfiltershader.c +++ b/gst/gl/gstglfiltershader.c @@ -160,8 +160,9 @@ gst_gl_filter_filtershader_reset (GstGLFilter * filter) GstGLFilterShader *filtershader = GST_GL_FILTERSHADER (filter); //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, filtershader->shader0); - + if (filtershader->shader0) + gst_gl_context_del_shader (filter->context, filtershader->shader0); + filtershader->shader0 = NULL; } static void diff --git a/gst/gl/gstglfiltersobel.c b/gst/gl/gstglfiltersobel.c index 35845fe27..f8b602bf9 100644 --- a/gst/gl/gstglfiltersobel.c +++ b/gst/gl/gstglfiltersobel.c @@ -155,10 +155,21 @@ gst_gl_filter_filtersobel_reset (GstGLFilter * filter) GstGLFilterSobel *filtersobel = GST_GL_FILTERSOBEL (filter); //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (filter->context, filtersobel->desat); - gst_gl_context_del_shader (filter->context, filtersobel->hconv); - gst_gl_context_del_shader (filter->context, filtersobel->vconv); - gst_gl_context_del_shader (filter->context, filtersobel->len); + if (filtersobel->desat) + gst_gl_context_del_shader (filter->context, filtersobel->desat); + filtersobel->desat = NULL; + + if (filtersobel->hconv) + gst_gl_context_del_shader (filter->context, filtersobel->hconv); + filtersobel->hconv = NULL; + + if (filtersobel->vconv) + gst_gl_context_del_shader (filter->context, filtersobel->vconv); + filtersobel->vconv = NULL; + + if (filtersobel->len) + gst_gl_context_del_shader (filter->context, filtersobel->len); + filtersobel->len = NULL; } static void diff --git a/gst/gl/gstglmosaic.c b/gst/gl/gstglmosaic.c index 09ec07ce2..aa2ceb702 100644 --- a/gst/gl/gstglmosaic.c +++ b/gst/gl/gstglmosaic.c @@ -176,7 +176,9 @@ gst_gl_mosaic_reset (GstGLMixer * mixer) mosaic->input_frames = NULL; //blocking call, wait the opengl thread has destroyed the shader - gst_gl_context_del_shader (mixer->context, mosaic->shader); + if (mosaic->shader) + gst_gl_context_del_shader (mixer->context, mosaic->shader); + mosaic->shader = NULL; } static gboolean |