st/gui: Handle setting recording info from the first frame

This commit is contained in:
Jakob Bornecrantz 2021-09-16 18:36:04 +01:00
parent 2b72672cc2
commit bef417b5a8

View file

@ -221,6 +221,14 @@ window_frame(struct xrt_frame_sink *xfs, struct xrt_frame *xf)
{
struct gui_record_window *rw = container_of(xfs, struct gui_record_window, sink);
if (rw->source.width != xf->width || rw->source.height != xf->height || rw->source.format != xf->format) {
assert(rw->source.width == 0 && rw->source.height == 0);
rw->source.width = xf->width;
rw->source.height = xf->height;
rw->source.format = xf->format;
}
#ifdef XRT_HAVE_GST
os_mutex_lock(&rw->gst.mutex);
if (rw->gst.sink != NULL) {