From 50d90f6dca82822bb8e19f8157cedc93699559d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 12 Oct 2021 19:52:06 +0300 Subject: [PATCH] Allocate more frame buffers for quad modes --- gstajasrc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gstajasrc.cpp b/gstajasrc.cpp index c7839c5c6d..8666b1ffe1 100644 --- a/gstajasrc.cpp +++ b/gstajasrc.cpp @@ -1784,9 +1784,13 @@ restart: if (start_frame == end_frame) { guint16 num_frames = ::NTV2DeviceGetNumberFrameBuffers(self->device_id); guint16 num_channels = ::NTV2DeviceGetNumFrameStores(self->device_id); + guint start_channel = self->channel; + guint end_channel = self->channel + 1; - start_frame = self->channel * (num_frames / num_channels); - end_frame = ((self->channel + 1) * (num_frames / num_channels)) - 1; + if (self->quad_mode) end_channel = self->channel + 4; + + start_frame = start_channel * (num_frames / num_channels); + end_frame = (end_channel * (num_frames / num_channels)) - 1; } GST_DEBUG_OBJECT(