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 467911 - [subparse] sami parser update
[subparse] sami parser update
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal minor
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-18 09:09 UTC by Young-Ho Cha
Modified: 2008-05-05 11:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
sami parser update (4.69 KB, patch)
2007-08-18 09:10 UTC, Young-Ho Cha
committed Details | Review
test source for check libxml behavier (3.18 KB, text/plain)
2007-10-12 12:32 UTC, Young-Ho Cha
  Details
result of sample code against libxml2 2.6.27 (453 bytes, text/plain)
2007-10-12 12:41 UTC, Young-Ho Cha
  Details
result of sample code against libxml2 2.6.30 (829 bytes, text/plain)
2007-10-12 12:41 UTC, Young-Ho Cha
  Details

Description Young-Ho Cha 2007-08-18 09:09:21 UTC
Please describe the problem:
There is two changes.
 1. process content data that surrounded with 'sync' tag only.
 2. tag compare until NULL.

After I updated gutsy, sami parser could't skip SAMI header data, and just render.

I found HTMLParser in libxml2 has some changes and don't emit about "title" tag any more.

So I update sami parser to process content data that surrounded with "sync" tag only.

And usage of xmlStrncmp, it didn't check end of string(until NULL), so it can make some bug.



Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Young-Ho Cha 2007-08-18 09:10:26 UTC
Created attachment 93890 [details] [review]
sami parser update
Comment 2 Tim-Philipp Müller 2007-09-06 11:16:56 UTC
How odd.  This is not a bug in libxml2 then?

Could you add such a SAMI file so I can write a unit test?
Comment 3 Tim-Philipp Müller 2007-10-11 19:23:35 UTC
Ping?
Comment 4 Young-Ho Cha 2007-10-12 12:32:31 UTC
Created attachment 97111 [details]
test source for check libxml behavier
Comment 5 Young-Ho Cha 2007-10-12 12:39:55 UTC
Sorry for delayed reply.

I couldn't check mailbox for a while.

I made a test source for libxml2 behavier between 2.6.27(feisty) and 2.6.30(gutsy).

and I found they have different behavier.

First of all, both emit 'title' tag. I had a misunderstand.

but 2.6.30 emit css contents in "style" tag(This is that I mentioned about "sami parser could't skip SAMI header data" in a report). 2.6.27 didn't.

So, a patch that I attached can resolve this bug.

I'll attach test source and result.
Comment 6 Young-Ho Cha 2007-10-12 12:41:25 UTC
Created attachment 97112 [details]
result of sample code against libxml2 2.6.27
Comment 7 Young-Ho Cha 2007-10-12 12:41:52 UTC
Created attachment 97113 [details]
result of sample code against libxml2 2.6.30
Comment 8 Sebastian Dröge (slomo) 2008-05-05 10:34:54 UTC
An example file would be at http://svn.annodex.net/scripts/trunk/subtitles/sample-sami.smi

Working on that now...
Comment 9 Sebastian Dröge (slomo) 2008-05-05 11:13:54 UTC
Something similar to your patch is now committed... thanks :)

2008-05-05  Sebastian Dröge  <slomo@circular-chaos.org>

        Patch by: Young-Ho Cha <ganadist at chollian dot net>

        * gst/subparse/samiparse.c: (handle_start_sync),
        (start_sami_element), (end_sami_element), (characters_sami),
        (sami_context_reset):
        Only output characters inside the "sync" elements. There could be
        other elements like "style" that have some content but should
        not be printed. Fixes bug #467911.