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.
This commit is contained in:
Mark Nauwelaerts 2017-01-07 20:11:13 +01:00
parent 4f478357ae
commit 2715daebf3

View file

@ -295,8 +295,13 @@ gst_gdk_pixbuf_overlay_set_property (GObject * object, guint property_id,
if (overlay->pixbuf != NULL)
g_object_unref (overlay->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: