From ec3edddc3a734784ada9f6a98481c80195b90e75 Mon Sep 17 00:00:00 2001 From: Hou Qi Date: Wed, 17 Apr 2024 10:58:00 +0900 Subject: [PATCH 6/7] waylandsink: config buffer pool with query size when propose_allocation If propose_allocation comes before set_caps, self->video_info has not been extracted from caps and self->video_info.size is 0. It causes buffer pool fail to set config . So need to use info size got from query instead when propose_allocation. Part-of: Upstream-Status: Backport --- ext/wayland/gstwaylandsink.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 4e6a459..066f05e 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -764,6 +764,13 @@ gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query) gst_query_parse_allocation (query, &caps, &need_pool); + if (caps == NULL) + return FALSE; + + /* extract info from caps */ + if (!gst_video_info_from_caps (&self->video_info, caps)) + return FALSE; + if (need_pool) { GstStructure *config; pool = gst_wl_video_buffer_pool_new (); -- 2.25.1