Commit 2715daeb authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

gdkpixbufoverlay: handle setting NULL gdkpixbuf

... which is a clearer way to clear any current overlay, other than
fiddling with alpha or positioning properties to make it virtually go away.
parent 4f478357
......@@ -295,8 +295,13 @@ gst_gdk_pixbuf_overlay_set_property (GObject * object, guint property_id,
if (overlay->pixbuf != NULL)
g_object_unref (overlay->pixbuf);
overlay->pixbuf = g_object_ref (pixbuf);
gst_gdk_pixbuf_overlay_set_pixbuf (overlay, g_object_ref (pixbuf));
if (pixbuf) {
overlay->pixbuf = g_object_ref (pixbuf);
gst_gdk_pixbuf_overlay_set_pixbuf (overlay, g_object_ref (pixbuf));
} else {
overlay->pixbuf = NULL;
gst_buffer_replace (&overlay->pixels, NULL);
}
break;
}
case PROP_OFFSET_X:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment