diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-12-14 13:06:57 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-12-14 13:06:57 +0100 |
commit | 7e761798bdb7342a4fd0377edb5740ce4cdeb763 (patch) | |
tree | 0edca3901b436f7688d96503eeea26f56033508b /plugins | |
parent | 33ded76ab8eafb9718460c8a01377b9f408124ea (diff) |
tee: Check if parsing the name template with sscanf() was successful
If not, go back to the automatic pad numbering.
CID 1195129
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gsttee.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 006ad26cc..ab726cd1a 100644 --- 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); |