After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 359237 - [typefinding] doesn't recognize XML files shorter than 256 bytes
[typefinding] doesn't recognize XML files shorter than 256 bytes
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal minor
: 0.10.11
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-03 10:40 UTC by Ferenc Gerlits
Modified: 2006-10-10 11:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch against version 0.8.12 of gst-plugins (511 bytes, patch)
2006-10-03 10:42 UTC, Ferenc Gerlits
committed Details | Review

Description Ferenc Gerlits 2006-10-03 10:40:48 UTC
Please describe the problem:
In the application/xml portion of gst/typefind/gsttypefindfunctions.c, the buffer size is set to 256.  This causes gst_type_find_peek to return NULL when an XML file shorter than 256 bytes is fed to it, and therefore the file is not recognized as a valid XML file.

This bug is present both in the 0.8.12 version of gst-plugins, and the HEAD version of gst-plugins-base.


Steps to reproduce:
1. Write your own XML handler plugin (for example, see the SMIL plugin in the LiveSupport project, http://livesupport.campware.org);
2. create an XML file shorter than 256 bytes, but otherwise valid;
3. try to play it.


Actual results:


Expected results:


Does this happen every time?
Yes.

Other information:
Comment 1 Ferenc Gerlits 2006-10-03 10:42:44 UTC
Created attachment 73931 [details] [review]
a patch against version 0.8.12 of gst-plugins
Comment 2 Tim-Philipp Müller 2006-10-10 11:20:31 UTC
Thanks for the patch, committed to CVS HEAD:

 2006-10-10  Tim-Philipp Müller  <tim at centricular dot net>

       Patch by: Ferenc Gerlits  <fgerlits at gmail com>

       * gst/typefind/gsttypefindfunctions.c:
         Recognise XML files and XML-like files shorter than 256 bytes as
         well (fixes #359237).

Please bear in mind that GStreamer-0.8 is out of date and completely unmaintained. Please send patches against GStreamer-0.10 in future. You should port any application still using 0.8 to 0.10.