mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
caps: Allow 1/max as the minimal fraction value > 0
This is useful for formats that require a valid framerate (like theoraenc).
This commit is contained in:
parent
14113e8661
commit
4743e62be8
1 changed files with 4 additions and 0 deletions
|
@ -3696,6 +3696,10 @@ gst_value_deserialize_fraction (GValue * dest, const gchar * s)
|
||||||
gst_value_set_fraction (dest, num, den);
|
gst_value_set_fraction (dest, num, den);
|
||||||
return TRUE;
|
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) {
|
if (sscanf (s, "%d", &num) == 1) {
|
||||||
gst_value_set_fraction (dest, num, 1);
|
gst_value_set_fraction (dest, num, 1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue