From 4057478d37f08d44dfbc1e846a1afedfcb2920ef Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 1 Nov 2017 18:24:11 +0100 Subject: oggstream: Add a default GstOggMap Since the default value of a GstOggPad.map.map was 0 ... we would end up using wrong functions from mappers() if the stream wasn't initialized yet. Instead of that, use a default blank/empty first entry. --- ext/ogg/gstoggstream.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index 0bca9aea2..c24fa2bc9 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -2251,6 +2251,23 @@ extract_tags_daala (GstOggStream * pad, ogg_packet * packet) /* *INDENT-OFF* */ /* indent hates our freedoms */ const GstOggMap mappers[] = { + { + /* Empty mapper for uninitialized pads/streams */ + NULL, 0, G_MAXINT32, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL + }, { "\200theora", 7, 42, "video/x-theora", -- cgit v1.2.1