[vlc-devel] [PATCH 2/2] URational: handle also plain integers
ileoo at videolan.org
ileoo at videolan.org
Sat Feb 15 11:57:16 CET 2014
From: Ilkka Ollakka <ileoo at videolan.org>
---
src/misc/variables.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/misc/variables.c b/src/misc/variables.c
index e3d56b7..683cc36 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1282,6 +1282,10 @@ int (var_InheritURational)(vlc_object_t *object,
if (n > 0 && d > 0)
vlc_ureduce(num, den, n, d, 0);
+ else if (n > 0 ){ /* plain integer given */
+ *num = n;
+ *den = 1;
+ }
free(tmp);
return VLC_SUCCESS;
--
1.8.5.2
More information about the vlc-devel
mailing list