mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 03:56:16 +00:00
cairorender: Return not-negotiated if we have no caps
This commit is contained in:
parent
52f17631d9
commit
7ba6ef6672
1 changed files with 4 additions and 0 deletions
|
@ -117,6 +117,9 @@ gst_cairo_render_chain (GstPad * pad, GstBuffer * buf)
|
||||||
cairo_surface_t *s;
|
cairo_surface_t *s;
|
||||||
gboolean success;
|
gboolean success;
|
||||||
|
|
||||||
|
if (G_UNLIKELY (c->width <= 0 || c->height <= 0 || c->stride <= 0))
|
||||||
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
|
|
||||||
if (c->png) {
|
if (c->png) {
|
||||||
GST_BUFFER_OFFSET (buf) = 0;
|
GST_BUFFER_OFFSET (buf) = 0;
|
||||||
s = cairo_image_surface_create_from_png_stream (read_buffer, buf);
|
s = cairo_image_surface_create_from_png_stream (read_buffer, buf);
|
||||||
|
@ -278,6 +281,7 @@ gst_cairo_render_init (GstCairoRender * c, GstCairoRenderClass * klass)
|
||||||
|
|
||||||
c->width = 0;
|
c->width = 0;
|
||||||
c->height = 0;
|
c->height = 0;
|
||||||
|
c->stride = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue