[MPlayer-dev-eng] A bit more liberal parsing of tags in .srt files?
Clément Bœsch
ubitux at gmail.com
Fri Apr 13 17:20:52 CEST 2012
On Fri, Apr 13, 2012 at 05:00:18PM +0200, Szokovacs Robert wrote:
> On 2012 Mar 03, Sat 15:04:35 Clément Bœsch wrote:
> > On Sat, Mar 03, 2012 at 02:57:18PM +0100, Reimar Döffinger wrote:
> > > On Wed, Feb 22, 2012 at 09:50:42PM +0100, SZOKOVACS Robert wrote:
> > > > On 2012. February 16. Thu 07:39:55 compn wrote:
> > > > > On Thu, 16 Feb 2012 11:13:01 +0100, Szokovacs Robert wrote:
> > > > > >Hi,
> > > > > >
> > > > > >A lot of .srt subtitle files I encounter on the net is deemed
> > > > > >incorrect by
> > > > > >the current mplayer, so the <font> tag is displayed as if it was part
> > > > > >of
> > > > > >the script.
> > > > > >(example: http://www.tvsubtitles.net/download-204587.html, some
> > > > > >color=
> > > > >
> > > > > i think we shouldnt render any <tag> with < and >.
> > > > > but instead silently drop it.
> > > > >
> > > > > i dont know whats best re: your idea. better wait for reimar.
> > > >
> > > > Reimar, would you please give us some pointers?
> > >
> > > I guess looking for < followed by a-z and where a > exists before the
> > > next < is about as reliable as you can make it if you want it to
> > > catch every case (well, the tags itself, handling hypothetical stuff
> > > like <comment>everything here should not be shown</comment> is
> > > definitely out of scope for MPlayer IMO.
> >
> > Not dropping the invalid tags was intentional; it helps showing "invalid"
> > samples. IMO it would be wise to instead fix the code to support
> > attributes specified without quotes.
>
> Hi,
>
> Attached is the patch doing this change.
> It also contains the color aliases mentioned it Federico Kereki's email at
> 12/03/24
>
Thank you, but before someone do a review, could you send a patch
following the coding style around?
And just a few things: can't you just skip the '"' if you find one? (so
<font size="foo> would be supported too, but it would simplifies the code.
Also, just a nit: please use post increment/decrement (it's not faster to
do a pre inc/dec in C).
Last thing: into the ffmpeg/ directory, run a make fate-rsync
SAMPLES=samples/, and you'll find samples/sub/SubRip_capability_tester.srt
as a good test-file.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120413/9f45d110/attachment.asc>
More information about the MPlayer-dev-eng
mailing list