... which is a clearer way to clear any current overlay, other than
fiddling with alpha or positioning properties to make it virtually go away.
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: