diff options
author | Benjamin Otte <otte@redhat.com> | 2010-03-08 22:05:29 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-03-08 22:26:34 +0100 |
commit | 4743e62be876a3bc6f06285cd3e687a767011354 (patch) | |
tree | 4d2b7af7d399b2987fd8865ffeb568dcfe2f5599 | |
parent | 14113e8661e30f865736b222c49497b6df633b66 (diff) |
caps: Allow 1/max as the minimal fraction value > 0
This is useful for formats that require a valid framerate (like
theoraenc).
-rw-r--r-- | gst/gstvalue.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/gstvalue.c b/gst/gstvalue.c index ad5b78a2ac..d9bad01e57 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -3696,6 +3696,10 @@ gst_value_deserialize_fraction (GValue * dest, const gchar * s) gst_value_set_fraction (dest, num, den); return TRUE; } + if (g_ascii_strcasecmp (s, "1/max") == 0) { + gst_value_set_fraction (dest, 1, G_MAXINT); + return TRUE; + } if (sscanf (s, "%d", &num) == 1) { gst_value_set_fraction (dest, num, 1); return TRUE; |