qtdemux: Fix segfault in cenc sample grouping

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4523>
This commit is contained in:
Xabier Rodriguez Calvar 2023-05-02 11:32:01 +02:00
parent d9c853f165
commit 66c15bc753

View file

@ -4428,7 +4428,8 @@ qtdemux_parse_moof (GstQTDemux * qtdemux, const guint8 * buffer, guint length,
goto missing_tfhd;
/* Sample grouping support */
if (stream->protected && (stream->protection_scheme_type == FOURCC_cenc
if (stream != NULL && stream->protected
&& (stream->protection_scheme_type == FOURCC_cenc
|| stream->protection_scheme_type == FOURCC_cbcs)) {
QtDemuxCencSampleSetInfo *info = stream->protection_scheme_info;
GNode *sbgp_node, *sgpd_node;