mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
matroskademux: Don't get stuck at the same offset when searching for clusters
This could happen if there is an invalid cluster with size 0, and in that case just error out instead of looping forever.
This commit is contained in:
parent
aa94fc6beb
commit
e596a3b6a7
1 changed files with 5 additions and 0 deletions
|
@ -1610,6 +1610,11 @@ gst_matroska_demux_search_cluster (GstMatroskaDemux * demux, gint64 * pos)
|
|||
GST_DEBUG_OBJECT (demux, "cluster is first cluster -> OK");
|
||||
break;
|
||||
}
|
||||
if (newpos == demux->common.offset) {
|
||||
GST_ERROR_OBJECT (demux, "Stuck at the same offset");
|
||||
ret = GST_FLOW_ERROR;
|
||||
goto exit;
|
||||
}
|
||||
demux->common.offset = newpos;
|
||||
ret = gst_matroska_read_common_peek_id_length_pull (&demux->common,
|
||||
GST_ELEMENT_CAST (demux), &id, &length, &needed);
|
||||
|
|
Loading…
Reference in a new issue