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:
6ea0bda
)
value: Add support for parsing short fourccs from strings
author
Martin Bisson
<martin.bisson@gmail.com>
Mon, 7 Jun 2010 06:18:40 +0000
(08:18 +0200)
committer
Sebastian Dröge
<sebastian.droege@collabora.co.uk>
Mon, 7 Jun 2010 06:21:00 +0000
(08:21 +0200)
For example "Y16 " and "Y8 ".
gst/gstvalue.c
patch
|
blob
|
history
diff --git
a/gst/gstvalue.c
b/gst/gstvalue.c
index
383b88a
..
05b76ef
100644
(file)
--- a/
gst/gstvalue.c
+++ b/
gst/gstvalue.c
@@
-727,6
+727,15
@@
gst_value_deserialize_fourcc (GValue * dest, const char *s)
if (strlen (s) == 4) {
fourcc = GST_MAKE_FOURCC (s[0], s[1], s[2], s[3]);
ret = TRUE;
+ } else if (strlen (s) == 3) {
+ fourcc = GST_MAKE_FOURCC (s[0], s[1], s[2], ' ');
+ ret = TRUE;
+ } else if (strlen (s) == 2) {
+ fourcc = GST_MAKE_FOURCC (s[0], s[1], ' ', ' ');
+ ret = TRUE;
+ } else if (strlen (s) == 1) {
+ fourcc = GST_MAKE_FOURCC (s[0], ' ', ' ', ' ');
+ ret = TRUE;
} else if (g_ascii_isdigit (*s)) {
fourcc = strtoul (s, &end, 0);
if (*end == 0) {