diff options
-rw-r--r-- | omx/gstomxvideodec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index d12ee8f..c934a4d 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -639,7 +639,7 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) GST_DEBUG_OBJECT (self, "Trying to allocate %d EGLImages", min); for (i = 0; i < min; i++) { - GstBuffer *buffer; + GstBuffer *buffer = NULL; GstMemory *mem; GstGLMemoryEGL *gl_mem; @@ -648,6 +648,7 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) || !(mem = gst_buffer_peek_memory (buffer, 0)) || !GST_IS_GL_MEMORY_EGL_ALLOCATOR (mem->allocator)) { GST_INFO_OBJECT (self, "Failed to allocated %d-th EGLImage", i); + gst_buffer_replace (&buffer, NULL); g_list_free_full (buffers, (GDestroyNotify) gst_buffer_unref); g_list_free (images); buffers = NULL; |