Commit 0b271a07 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

gst/typefind/gsttypefindfunctions.c: Limit search for the first markup tag to...

gst/typefind/gsttypefindfunctions.c: Limit search for the first markup tag to the first few kB of the file. If we don...

Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (xml_check_first_element):
Limit search for the first markup tag to the first few kB of
the file. If we don't find one there, it's highly unlikely that
this is an XML(-ish) file.
parent 810ac2d7
2006-07-22 Tim-Philipp Müller <tim at centricular dot net>
* gst/typefind/gsttypefindfunctions.c: (xml_check_first_element):
Limit search for the first markup tag to the first few kB of
the file. If we don't find one there, it's highly unlikely that
this is an XML(-ish) file.
2006-07-21 Andy Wingo <wingo@pobox.com>
 
* tests/check/pipelines/theoraenc.c (test_discontinuity): Similar
......
......@@ -225,9 +225,10 @@ xml_check_first_element (GstTypeFind * tf, const gchar * element, guint elen,
data += 5;
}
/* look for the first element, it has to be the requested element */
while (data) {
while (*data != '<') {
/* look for the first element, it has to be the requested element. Bail
* out if it is not within the first 4kB. */
while (data && (offset + pos) < 4096) {
while (*data != '<' && (offset + pos) < 4096) {
XML_INC_BUFFER;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment