caps: don't create broken caps for invalid media types
authorJonathan Matthew <jonathan@d14n.org>
Thu, 3 Mar 2011 22:28:25 +0000 (08:28 +1000)
committerStefan Kost <ensonic@users.sf.net>
Tue, 8 Mar 2011 08:06:12 +0000 (10:06 +0200)
commit2bbfa3304ce183a1ef936023b4959c4134161c46
tree84d28acd2e5426c738aecb46f547b8e6ee1ad765
parenteb05020f58c483d8b69927abf0bcbb9867f87775
caps: don't create broken caps for invalid media types

Check if structure has been created before appending it to the caps. Free the
caps in the case of an error to not conceal it be returning empty caps.

Fixes #642271
gst/gstcaps.c