From 66c15bc753f2aeb58fd08dd08354e3b0ae043192 Mon Sep 17 00:00:00 2001 From: Xabier Rodriguez Calvar Date: Tue, 2 May 2023 11:32:01 +0200 Subject: [PATCH] qtdemux: Fix segfault in cenc sample grouping Part-of: --- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index 8c09438da1..3d668a9c8e 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -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;