diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index 4e651b2380..2d1887a7c9 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -2843,8 +2843,13 @@ qtdemux_parse_piff (GstQTDemux * qtdemux, const guint8 * buffer, gint length, return; } - gst_structure_get (structure, GST_PROTECTION_SYSTEM_ID_CAPS_FIELD, - G_TYPE_STRING, &system_id, NULL); + if (!gst_structure_get (structure, GST_PROTECTION_SYSTEM_ID_CAPS_FIELD, + G_TYPE_STRING, &system_id, NULL)) { + GST_WARNING_OBJECT (qtdemux, "%s field not present in caps", + GST_PROTECTION_SYSTEM_ID_CAPS_FIELD); + return; + } + gst_qtdemux_append_protection_system_id (qtdemux, system_id); stream->protected = TRUE;