mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
glcolorconvertelement: propagate failure to convert buffer upstream
Rather than just silently continuing
This commit is contained in:
parent
e96431e9b1
commit
0aaf9db1df
1 changed files with 7 additions and 3 deletions
|
@ -197,11 +197,15 @@ gst_gl_color_convert_element_prepare_output_buffer (GstBaseTransform * bt,
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
|
|
||||||
*outbuf = gst_gl_color_convert_perform (convert->convert, inbuf);
|
*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 */
|
/* basetransform doesn't unref if they're the same */
|
||||||
if (inbuf == *outbuf)
|
if (inbuf == *outbuf)
|
||||||
gst_buffer_unref (*outbuf);
|
gst_buffer_unref (*outbuf);
|
||||||
if (*outbuf)
|
|
||||||
gst_buffer_copy_into (*outbuf, inbuf,
|
gst_buffer_copy_into (*outbuf, inbuf,
|
||||||
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
|
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue