break;
}
+ /* Size field is mandatory and we have no size if now using our own pool and
+ * downstream didn't provide one. */
+ if (size == 0) {
+ GstVideoInfo info;
+
+ gst_video_info_init (&info);
+ gst_video_info_from_caps (&info, caps);
+
+ size = GST_VIDEO_INFO_SIZE (&info);
+ }
+
if (pool) {
GstStructure *config;
gst_buffer_pool_set_config (pool, config);
}
- /* Size field is mandatory and we have no size if now using our own pool and
- * downstream didn't provide one. */
- if (size == 0) {
- GstVideoInfo info;
-
- gst_video_info_init (&info);
- gst_video_info_from_caps (&info, caps);
-
- size = GST_VIDEO_INFO_SIZE (&info);
- }
-
if (update)
gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max);
else