mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
typefinding: assume EBML files without doctype are matroska
https://bugzilla.gnome.org/show_bug.cgi?id=638019
This commit is contained in:
parent
b1696cf21d
commit
bb786dfb5c
1 changed files with 6 additions and 0 deletions
|
@ -3184,6 +3184,10 @@ ebml_check_header (GstTypeFind * tf, const gchar * doctype, int doctype_len)
|
||||||
if (!data)
|
if (!data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* only check doctype if asked to do so */
|
||||||
|
if (doctype == NULL || doctype_len == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* the header must contain the doctype. For now, we don't parse the
|
/* the header must contain the doctype. For now, we don't parse the
|
||||||
* whole header but simply check for the availability of that array
|
* whole header but simply check for the availability of that array
|
||||||
* of characters inside the header. Not fully fool-proof, but good
|
* of characters inside the header. Not fully fool-proof, but good
|
||||||
|
@ -3204,6 +3208,8 @@ matroska_type_find (GstTypeFind * tf, gpointer ununsed)
|
||||||
{
|
{
|
||||||
if (ebml_check_header (tf, "matroska", 8))
|
if (ebml_check_header (tf, "matroska", 8))
|
||||||
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MATROSKA_CAPS);
|
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MATROSKA_CAPS);
|
||||||
|
else if (ebml_check_header (tf, NULL, 0))
|
||||||
|
gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY, MATROSKA_CAPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** video/webm ***/
|
/*** video/webm ***/
|
||||||
|
|
Loading…
Reference in a new issue