From: Edward Hervey Date: Wed, 1 Nov 2017 17:24:11 +0000 (+0100) Subject: oggstream: Add a default GstOggMap X-Git-Tag: 1.16.2~1040 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3006b17d1b927184197564b279ebb53bd9a650b;p=platform%2Fupstream%2Fgst-plugins-base.git 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. --- diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index d477397..b4ee557 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -2241,6 +2241,23 @@ extract_tags_daala (GstOggStream * pad, ogg_packet * packet) /* 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", setup_theora_mapper,