From c3006b17d1b927184197564b279ebb53bd9a650b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 1 Nov 2017 18:24:11 +0100 Subject: [PATCH] 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 d477397654..b4ee557737 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -2240,6 +2240,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",