From a17e6656ad0018887e4de00122540ce5f43f771c Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Thu, 13 Aug 2020 14:24:44 -0400 Subject: [PATCH] matroxsrc: actually respect channel property for selecting digitizer Before it was ignored, so the MilConfig default was always used. --- sys/matrox/gstmatroxsrc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/matrox/gstmatroxsrc.c b/sys/matrox/gstmatroxsrc.c index 2478ab0..ca0c822 100644 --- a/sys/matrox/gstmatroxsrc.c +++ b/sys/matrox/gstmatroxsrc.c @@ -501,8 +501,13 @@ gst_matroxsrc_start (GstBaseSrc * bsrc) } /* create Digitizer */ - ret = MdigAlloc (src->MilSystem, M_DEFAULT, src->config_file, M_DEFAULT, - &src->MilDigitizer); + if (src->channel == -1) { + ret = MdigAlloc (src->MilSystem, M_DEFAULT, src->config_file, M_DEFAULT, + &src->MilDigitizer); + } else { + ret = MdigAlloc (src->MilSystem, src->channel, src->config_file, M_DEFAULT, + &src->MilDigitizer); + } if (ret == M_NULL) { GST_ELEMENT_ERROR (src, RESOURCE, FAILED, ("Failed to allocate a MIL digitizer"), (NULL));