mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 13:48:55 +00:00
matroskademux: do not error out on a block with unknown tracknumber
This commit is contained in:
parent
bbded080e0
commit
18f37ffc9a
1 changed files with 9 additions and 5 deletions
|
@ -4405,13 +4405,17 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
|
||||||
|
|
||||||
/* fetch stream from num */
|
/* fetch stream from num */
|
||||||
stream_num = gst_matroska_demux_stream_from_num (demux, num);
|
stream_num = gst_matroska_demux_stream_from_num (demux, num);
|
||||||
if (size < 3 || stream_num < 0 || stream_num >= demux->num_streams) {
|
if (G_UNLIKELY (size < 3)) {
|
||||||
gst_buffer_unref (buf);
|
GST_WARNING_OBJECT (demux, "Invalid size %u", size);
|
||||||
buf = NULL;
|
|
||||||
GST_WARNING_OBJECT (demux, "Invalid stream %d or size %u", stream_num,
|
|
||||||
size);
|
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
break;
|
break;
|
||||||
|
} else if (G_UNLIKELY (stream_num < 0 ||
|
||||||
|
stream_num >= demux->num_streams)) {
|
||||||
|
/* let's not give up on a stray invalid track number */
|
||||||
|
GST_WARNING_OBJECT (demux,
|
||||||
|
"Invalid stream %d for track number %" G_GUINT64_FORMAT
|
||||||
|
"; ignoring block", stream_num);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream = g_ptr_array_index (demux->src, stream_num);
|
stream = g_ptr_array_index (demux->src, stream_num);
|
||||||
|
|
Loading…
Reference in a new issue