Because GstMatroskaTrackContext *stream is set up in the first
SimpleBlock or Block, a rogue CodecState otherwise causes a segfault on
derefencing the NULL pointer. Test case:
bug_s5506167_r0.001____gst_matroska_demux_parse_blockgroup_or_simpleblock.webm
&data_len)) != GST_FLOW_OK)
break;
+ if (G_UNLIKELY (stream == NULL)) {
+ GST_WARNING_OBJECT (demux,
+ "Unexpected CodecState subelement - ignoring");
+ break;
+ }
+
g_free (stream->codec_state);
stream->codec_state = data;
stream->codec_state_size = data_len;