[MPlayer-dev-eng] A bit more liberal parsing of tags in .srt files?

Szokovacs Robert szo at szo.hu
Mon May 21 17:46:20 CEST 2012


On 2012 Apr 13, Fri 18:35:10 you wrote:

Could somebody take a look please?

br

Szo

> On 2012. April 13., Clément Bœsch wrote:
> > 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
> 
> Hi,
> 
> > Thank you, but before someone do a review, could you send a patch
> > following the coding style around?
> 
> updated version attached.
> 
> > 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.
> 
> I considered this, but then the font tags with more than one attribute would
> become confusing...
> 
> > Also, just a nit: please use post increment/decrement (it's not
> > faster to do a pre inc/dec in C).
> 
> br
> 
> Szo


More information about the MPlayer-dev-eng mailing list