diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp index 9ae82072b36c..d458ada1f6c7 100644 --- a/modules/demux/hls/playlist/Parser.cpp +++ b/modules/demux/hls/playlist/Parser.cpp @@ -310,7 +310,8 @@ void M3U8Parser::parseSegments(vlc_object_t *, Representation *rep, const std::l } M3U8 *m3u8 = dynamic_cast(rep->getPlaylist()); - encryption.key = m3u8->getEncryptionKey(keyurl.toString()); + if(likely(m3u8)) + encryption.key = m3u8->getEncryptionKey(keyurl.toString()); if(keytag->getAttributeByName("IV")) { encryption.iv.clear();