mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 05:56:31 +00:00
decodebin: move null check
Check if dbin->decode_chain is NULL before running drain_and_switch_chains() because if it is, we shouldn't run that function or it will segfault. CID #1271074
This commit is contained in:
parent
b3053925ac
commit
8703d93bbf
1 changed files with 5 additions and 5 deletions
|
@ -3903,12 +3903,12 @@ gst_decode_pad_handle_eos (GstDecodePad * pad)
|
|||
|
||||
GST_LOG_OBJECT (dbin, "pad %p", pad);
|
||||
EXPOSE_LOCK (dbin);
|
||||
drain_and_switch_chains (dbin->decode_chain, pad, &last_group, &drained,
|
||||
&switched);
|
||||
if (dbin->decode_chain) {
|
||||
drain_and_switch_chains (dbin->decode_chain, pad, &last_group, &drained,
|
||||
&switched);
|
||||
|
||||
if (switched) {
|
||||
/* If we resulted in a group switch, expose what's needed */
|
||||
if (dbin->decode_chain) {
|
||||
if (switched) {
|
||||
/* If we resulted in a group switch, expose what's needed */
|
||||
if (gst_decode_chain_is_complete (dbin->decode_chain))
|
||||
gst_decode_bin_expose (dbin);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue