mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
matroskademux: proper handling of streaming upstream without duration
Fixes #625371.
This commit is contained in:
parent
a0de5e8a4f
commit
8419df627b
1 changed files with 7 additions and 3 deletions
|
@ -570,12 +570,11 @@ static gint64
|
|||
gst_matroska_demux_get_length (GstMatroskaDemux * demux)
|
||||
{
|
||||
GstFormat fmt = GST_FORMAT_BYTES;
|
||||
gint64 end;
|
||||
gint64 end = -1;
|
||||
|
||||
/* FIXME: what to do if we don't get the upstream length */
|
||||
if (!gst_pad_query_peer_duration (demux->sinkpad, &fmt, &end) ||
|
||||
fmt != GST_FORMAT_BYTES || end < 0)
|
||||
g_return_val_if_reached (0);
|
||||
GST_DEBUG_OBJECT (demux, "no upstream length");
|
||||
|
||||
return end;
|
||||
}
|
||||
|
@ -5291,6 +5290,11 @@ gst_matroska_demux_parse_contents_seekentry (GstMatroskaDemux * demux,
|
|||
length = gst_matroska_demux_get_length (demux);
|
||||
before_pos = demux->offset;
|
||||
|
||||
if (length == (guint64) - 1) {
|
||||
GST_DEBUG_OBJECT (demux, "no upstream length, skipping SeakHead entry");
|
||||
break;
|
||||
}
|
||||
|
||||
/* check for validity */
|
||||
if (seek_pos + demux->ebml_segment_start + 12 >= length) {
|
||||
GST_WARNING_OBJECT (demux,
|
||||
|
|
Loading…
Reference in a new issue