weston: modify buffer release flow [1/1]

PD#SWPL-182297

Problem:
video buffer is ready to release when surface is
destroyed. buffer release is invalid.

Solution:
ignore buffer release when the surface is destroyed.

Verify:
ah212

Change-Id: I4b3c8179c953ae864ea6d190a2369af6814cb622
Signed-off-by: limin.tian <limin.tian@amlogic.com>
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 32944b2..eb7a5f6 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -3488,6 +3488,7 @@
 		}
 		buffer->surface = surface;
 		buffer->attach = buffer->attach+1;
+		buffer->ec = surface->compositor;
 	}
 
 	/* Attach, attach, without commit in between does not send