From 3ec419676931bcb9a0c6fb5a390d68deb8d49319 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 3 Dec 2007 10:58:14 +0000 Subject: [PATCH] ext/ogg/gstoggdemux.c: If we find a new serial number but it does not contain a BOS page, make sure we initialize the... Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_demux_bisect_forward_serialno), (gst_ogg_demux_read_chain): If we find a new serial number but it does not contain a BOS page, make sure we initialize the chain to NULL because else we will try to scan it and crash. Fixes #500763 --- ChangeLog | 8 ++++++++ ext/ogg/gstoggdemux.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index bb82b6a..3641593 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-12-03 Wim Taymans + + * ext/ogg/gstoggdemux.c: (gst_ogg_demux_bisect_forward_serialno), + (gst_ogg_demux_read_chain): + If we find a new serial number but it does not contain a BOS page, make + sure we initialize the chain to NULL because else we will try to scan it + and crash. Fixes #500763 + 2007-11-30 Wim Taymans * gst/playback/Makefile.am: diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 5a6ca2b..0cba0a5 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2295,6 +2295,8 @@ gst_ogg_demux_bisect_forward_serialno (GstOggDemux * ogg, if (ret != GST_FLOW_OK) goto done; } + GST_LOG_OBJECT (ogg, "adding chain %p", chain); + g_array_insert_val (ogg->chains, 0, chain); done: @@ -2363,6 +2365,8 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain) if (chain) { gst_ogg_chain_free (chain); } + if (res_chain) + *res_chain = NULL; return ret; } -- 2.7.4