ext/ogg/gstoggdemux.c: When we fail to find a BOS page and we and up with no chain, error out properly instead of seg...

Original commit message from CVS:
Patch by: Victor STINNER <victor dot stinner at haypocalc dot com>
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_activate_chain),
(gst_ogg_demux_read_chain):
When we fail to find a BOS page and we and up with no chain, error out
properly instead of segfaulting. Fixes #525665.
This commit is contained in:
Victor STINNER 2008-04-02 15:07:01 +00:00 committed by Wim Taymans
parent 9d4543ed67
commit 38d188e468
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2008-04-02 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Victor STINNER <victor dot stinner at haypocalc dot com>
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_activate_chain),
(gst_ogg_demux_read_chain):
When we fail to find a BOS page and we and up with no chain, error out
properly instead of segfaulting. Fixes #525665.
2008-04-02 Wim Taymans <wim.taymans@collabora.co.uk>
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_activate_chain),

View file

@ -2357,7 +2357,10 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain)
}
if (ret != GST_FLOW_OK || chain == NULL) {
if (ret != GST_FLOW_UNEXPECTED) {
if (chain == NULL) {
GST_WARNING_OBJECT (ogg, "no chain was found");
ret = GST_FLOW_ERROR;
} else if (ret != GST_FLOW_UNEXPECTED) {
GST_WARNING_OBJECT (ogg, "failed to read chain");
} else {
GST_DEBUG_OBJECT (ogg, "done reading chains");