matroskaparse: ignore parsing errors at the end of the file

This is the same change as a3a55305 for the parser.

https://bugzilla.gnome.org/show_bug.cgi?id=774566
This commit is contained in:
Nicola Murino 2016-11-16 22:39:01 +01:00 committed by Sebastian Dröge
parent dcd3ce9751
commit 7627171566

View file

@ -3011,8 +3011,13 @@ next:
ret = gst_matroska_read_common_peek_id_length_push (&parse->common, ret = gst_matroska_read_common_peek_id_length_push (&parse->common,
GST_ELEMENT_CAST (parse), &id, &length, &needed); GST_ELEMENT_CAST (parse), &id, &length, &needed);
if (G_UNLIKELY (ret != GST_FLOW_OK && ret != GST_FLOW_EOS)) if (G_UNLIKELY (ret != GST_FLOW_OK && ret != GST_FLOW_EOS)) {
if (parse->common.ebml_segment_length != G_MAXUINT64
&& parse->common.offset >=
parse->common.ebml_segment_start + parse->common.ebml_segment_length)
ret = GST_FLOW_EOS;
return ret; return ret;
}
GST_LOG_OBJECT (parse, "Offset %" G_GUINT64_FORMAT ", Element id 0x%x, " GST_LOG_OBJECT (parse, "Offset %" G_GUINT64_FORMAT ", Element id 0x%x, "
"size %" G_GUINT64_FORMAT ", needed %d, available %d", "size %" G_GUINT64_FORMAT ", needed %d, available %d",