summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2010-01-21 17:31:13 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2010-01-21 17:39:51 +0100
commit06e2d2791b7a6e835e1e40d29d1e74cd571567ed (patch)
tree860f1375eca7746142c501d7484f8a271850b264 /ext
parent4ed58b58826a99def290133533837928cd2b41c2 (diff)
oggstream: don't call NULL setup functions
If we find a known mapper but it doesn't have a setup function, simply skip it instead of crashing.
Diffstat (limited to 'ext')
-rw-r--r--ext/ogg/gstoggstream.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c
index 3057167cd..d0c9fa367 100644
--- a/ext/ogg/gstoggstream.c
+++ b/ext/ogg/gstoggstream.c
@@ -1282,7 +1282,14 @@ gst_ogg_stream_setup_map (GstOggStream * pad, ogg_packet * packet)
if (packet->bytes >= mappers[i].min_packet_size &&
packet->bytes >= mappers[i].id_length &&
memcmp (packet->packet, mappers[i].id, mappers[i].id_length) == 0) {
- ret = mappers[i].setup_func (pad, packet);
+
+ GST_DEBUG ("found mapper for '%s'", mappers[i].id);
+
+ if (mappers[i].setup_func)
+ ret = mappers[i].setup_func (pad, packet);
+ else
+ continue;
+
if (ret) {
GST_DEBUG ("got stream type %" GST_PTR_FORMAT, pad->caps);
pad->map = i;