mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-01 17:31:10 +00:00
oggdemux: activate_chain must not be called with a NULL chain
It will crash later and shouldn't really happen anyway unless something is really wrong.
This commit is contained in:
parent
9c570dbced
commit
9a971980b7
1 changed files with 31 additions and 32 deletions
|
@ -1743,6 +1743,9 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
|
||||||
GstEvent * event)
|
GstEvent * event)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
|
gint bitrate, idx_bitrate;
|
||||||
|
|
||||||
|
g_return_val_if_fail (chain != NULL, FALSE);
|
||||||
|
|
||||||
if (chain == ogg->current_chain) {
|
if (chain == ogg->current_chain) {
|
||||||
if (event)
|
if (event)
|
||||||
|
@ -1750,9 +1753,6 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME, should not be called with NULL */
|
|
||||||
if (chain != NULL) {
|
|
||||||
gint bitrate, idx_bitrate;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ogg, "activating chain %p", chain);
|
GST_DEBUG_OBJECT (ogg, "activating chain %p", chain);
|
||||||
|
|
||||||
|
@ -1794,7 +1794,6 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
|
||||||
}
|
}
|
||||||
/* prefer the index bitrate over the ones encoded in the streams */
|
/* prefer the index bitrate over the ones encoded in the streams */
|
||||||
ogg->bitrate = (idx_bitrate ? idx_bitrate : bitrate);
|
ogg->bitrate = (idx_bitrate ? idx_bitrate : bitrate);
|
||||||
}
|
|
||||||
|
|
||||||
/* after adding the new pads, remove the old pads */
|
/* after adding the new pads, remove the old pads */
|
||||||
gst_ogg_demux_deactivate_current_chain (ogg);
|
gst_ogg_demux_deactivate_current_chain (ogg);
|
||||||
|
|
Loading…
Reference in a new issue