summaryrefslogtreecommitdiff
path: root/ext/gl
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2015-07-17 17:47:37 +1000
committerMatthew Waters <matthew@centricular.com>2015-07-18 16:32:15 +1000
commit0aaf9db1df81dd7a02799c6502d72ade3080ae47 (patch)
tree8a40baa0455b0124c1a8dcecc5c3f8821d26a5f7 /ext/gl
parente96431e9b1c0722fd69cd4cfb8d58e3a52e6cee2 (diff)
downloadgstreamer-plugins-bad-0aaf9db1df81dd7a02799c6502d72ade3080ae47.tar.gz
glcolorconvertelement: propagate failure to convert buffer upstream
Rather than just silently continuing
Diffstat (limited to 'ext/gl')
-rw-r--r--ext/gl/gstglcolorconvertelement.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/gl/gstglcolorconvertelement.c b/ext/gl/gstglcolorconvertelement.c
index 833d07e01..8ad44abe5 100644
--- a/ext/gl/gstglcolorconvertelement.c
+++ b/ext/gl/gstglcolorconvertelement.c
@@ -197,13 +197,17 @@ gst_gl_color_convert_element_prepare_output_buffer (GstBaseTransform * bt,
return GST_FLOW_NOT_NEGOTIATED;
*outbuf = gst_gl_color_convert_perform (convert->convert, inbuf);
+ if (!*outbuf) {
+ GST_ELEMENT_ERROR (bt, RESOURCE, NOT_FOUND,
+ ("%s", "Failed to convert video buffer"), (NULL));
+ return GST_FLOW_ERROR;
+ }
/* basetransform doesn't unref if they're the same */
if (inbuf == *outbuf)
gst_buffer_unref (*outbuf);
- if (*outbuf)
- gst_buffer_copy_into (*outbuf, inbuf,
- GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
+ gst_buffer_copy_into (*outbuf, inbuf,
+ GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
return GST_FLOW_OK;
}