projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14113e8
)
caps: Allow 1/max as the minimal fraction value > 0
author
Benjamin Otte
<otte@redhat.com>
Mon, 8 Mar 2010 21:05:29 +0000
(22:05 +0100)
committer
Benjamin Otte
<otte@redhat.com>
Mon, 8 Mar 2010 21:26:34 +0000
(22:26 +0100)
This is useful for formats that require a valid framerate (like
theoraenc).
gst/gstvalue.c
patch
|
blob
|
history
diff --git
a/gst/gstvalue.c
b/gst/gstvalue.c
index ad5b78a2ac16455d38c8369f0b88eb478d5bf041..d9bad01e57b76065fb18b53ce3f08e86d294dd5e 100644
(file)
--- 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;