From f25f2505912b738468e34c39387daa3ab5fae70d Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Mon, 24 Jul 2023 00:06:32 +0200 Subject: [PATCH 1/2] AVDevice Plugin: Fix dependency function for int/float values --- avdevice/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avdevice/__init__.py b/avdevice/__init__.py index 0b7d30c99..090fcd4fb 100755 --- a/avdevice/__init__.py +++ b/avdevice/__init__.py @@ -1201,7 +1201,7 @@ def _checkdependency(self, dep_function, dep_type): expectedvalue = eval(expectedvalue.lstrip('0')) except Exception: pass - if type(dependvalue) == type(expectedvalue): + if type(dependvalue) == type(expectedvalue) or (isinstance(dependvalue, (int,float)) and isinstance(expectedvalue, (int,float))): groupcount[group] += 1 if (dependvalue == expectedvalue and compare == '==') or \ (dependvalue >= expectedvalue and compare == '>=') or \ (dependvalue <= expectedvalue and compare == '<=') or \ From b75576b296ab99faace180c0072c1e7cc4b9daec Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Mon, 24 Jul 2023 08:09:35 +0200 Subject: [PATCH 2/2] avdevice plugin: fix dependency check part 2 --- avdevice/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avdevice/__init__.py b/avdevice/__init__.py index 090fcd4fb..e178f5872 100755 --- a/avdevice/__init__.py +++ b/avdevice/__init__.py @@ -1256,7 +1256,7 @@ def _checkdependency(self, dep_function, dep_type): self.logger.log(VERBOSE2, "Checking Dependency {}: Expectedvalue after Translation {}. Dependitem: {}, expected {}".format( self._name, expectedvalue, dependitem, expectedvalue)) - if type(dependvalue) == type(expectedvalue): + if type(dependvalue) == type(expectedvalue) or (isinstance(dependvalue, (int,float)) and isinstance(expectedvalue, (int,float))): groupcount[group] += 1 if (dependvalue == expectedvalue and compare == '==') or \ (dependvalue >= expectedvalue and compare == '>=') or \ (dependvalue <= expectedvalue and compare == '<=') or \