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:
33ded76
)
tee: Check if parsing the name template with sscanf() was successful
author
Sebastian Dröge
<sebastian@centricular.com>
Mon, 14 Dec 2015 12:06:57 +0000
(13:06 +0100)
committer
Sebastian Dröge
<sebastian@centricular.com>
Mon, 14 Dec 2015 12:06:57 +0000
(13:06 +0100)
If not, go back to the automatic pad numbering.
CID 1195129
plugins/elements/gsttee.c
patch
|
blob
|
history
diff --git
a/plugins/elements/gsttee.c
b/plugins/elements/gsttee.c
index
006ad26
..
ab726cd
100644
(file)
--- a/
plugins/elements/gsttee.c
+++ b/
plugins/elements/gsttee.c
@@
-361,8
+361,7
@@
gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
GST_OBJECT_LOCK (tee);
- if (name_templ) {
- sscanf (name_templ, "src_%u", &index);
+ if (name_templ && sscanf (name_templ, "src_%u", &index) == 1) {
GST_LOG_OBJECT (element, "name: %s (index %d)", name_templ, index);
if (g_hash_table_contains (tee->pad_indexes, GUINT_TO_POINTER (index))) {
GST_ERROR_OBJECT (element, "pad name %s is not unique", name_templ);