[Bug 280377] [NEW] subrip subtitles typefind too strict

2008-10-08 Thread xbx
Public bug reported:

I have a (malformed?) srt file that doesn't get detected as a subtitle file by 
gstreamer sub parse.
(whereas it works with other mediaplayers)


it looks like:
=
1

 0: 0:26, 26 --  0: 0:28, 17

I can't see.


2

 0: 0:30, 30 --  0: 0:33, 22

I really can't see.


3

 0: 0:40, 40 --  0: 0:44, 44

I still can't see anything.

[...]
==

But if I just change the first two lines, filling with '0' instead of spaces:
=
1

00:00:26,026 -- 00:00:28,017

I can't see.


2

 0: 0:30, 30 --  0: 0:33, 22

I really can't see.


3

 0: 0:40, 40 --  0: 0:44, 44

I still can't see anything.
[...]


all works as expected.

** Affects: gst-plugins-base0.10 (Ubuntu)
 Importance: Undecided
 Status: New

-- 
subrip subtitles typefind too strict
https://bugs.launchpad.net/bugs/280377
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gst-plugins-base0.10 in ubuntu.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 280377] Re: subrip subtitles typefind too strict

2008-10-08 Thread xbx
applying this simple change fixes the problem:

--- gstsubparse.c.orig  2008-10-08 21:32:17.0 +0200
+++ gstsubparse.c   2008-10-08 21:24:13.0 +0200
@@ -913,9 +913,9 @@
 need_init_regexps = FALSE;
 if ((err = regcomp (mdvd_rx, ^\\{[0-9]+\\}\\{[0-9]+\\},
 REG_EXTENDED | REG_NEWLINE | REG_NOSUB) != 0) ||
-(err = regcomp (subrip_rx, ^[0-9]([0-9]){0,3}(\x0d)?\x0a
-[0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9]{3}
- -- [0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9]{3},
+(err = regcomp (subrip_rx, ^([ 0-9]){0,3}[0-9](\x0d)?\x0a
+[ 0-9][0-9]:[ 0-9][0-9]:[ 0-9][0-9],[ 0-9]{3}
+ -- [ 0-9][0-9]:[ 0-9][0-9]:[ 0-9][0-9],[ 0-9]{3},
 REG_EXTENDED | REG_NEWLINE | REG_NOSUB)) != 0) {
   regerror (err, subrip_rx, errstr, 127);
   GST_WARNING (Compilation of subrip regex failed: %s, errstr);

-- 
subrip subtitles typefind too strict
https://bugs.launchpad.net/bugs/280377
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gst-plugins-base0.10 in ubuntu.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs