summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-11-01 18:24:11 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-12-01 10:02:03 +0100
commit4057478d37f08d44dfbc1e846a1afedfcb2920ef (patch)
tree2de1e331569b67afdd330e371a1c8a8346dd25ff
parent40a539ed91589eddd119270216ee48ab0ec7a00d (diff)
downloadgstreamer-plugins-base-4057478d37f08d44dfbc1e846a1afedfcb2920ef.tar.gz
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.
-rw-r--r--ext/ogg/gstoggstream.c17
1 files changed, 17 insertions, 0 deletions
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
@@ -2252,6 +2252,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,