matroxsrc: actually respect channel property for selecting digitizer

Before it was ignored, so the MilConfig default was always used.
This commit is contained in:
Joshua M. Doe 2020-08-13 14:24:44 -04:00
parent 5baad42603
commit a17e6656ad

View File

@ -501,8 +501,13 @@ gst_matroxsrc_start (GstBaseSrc * bsrc)
} }
/* create Digitizer */ /* create Digitizer */
ret = MdigAlloc (src->MilSystem, M_DEFAULT, src->config_file, M_DEFAULT, if (src->channel == -1) {
&src->MilDigitizer); 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) { if (ret == M_NULL) {
GST_ELEMENT_ERROR (src, RESOURCE, FAILED, GST_ELEMENT_ERROR (src, RESOURCE, FAILED,
("Failed to allocate a MIL digitizer"), (NULL)); ("Failed to allocate a MIL digitizer"), (NULL));