qtdemux: Avoid crash on reconfiguring.

When reconfiguring a stream that never created
an output pad, don't access a NULL GstPad pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2869>
This commit is contained in:
Jan Schmidt 2022-08-12 20:20:43 +10:00 committed by GStreamer Marge Bot
parent a3037eb453
commit c2fa0b50ce

View file

@ -13596,7 +13596,8 @@ qtdemux_reuse_and_configure_stream (GstQTDemux * qtdemux,
/* unset new_stream to prevent stream-start event, unless we are EOS in which
* case we need to force one through */
newstream->new_stream = GST_PAD_IS_EOS (newstream->pad);
newstream->new_stream = newstream->pad != NULL
&& GST_PAD_IS_EOS (newstream->pad);
return gst_qtdemux_configure_stream (qtdemux, newstream);
}