[MPlayer-dev-eng] [PATCH] cleanup handling of vobsub extradata

Aurelien Jacobs aurel at gnuage.org
Thu Sep 11 19:56:07 CEST 2008


Reimar Doeffinger wrote:

> On Thu, Sep 11, 2008 at 01:31:48PM +0200, Aurelien Jacobs wrote:
> > Reimar Doeffinger wrote:
> > 
> > > On Wed, Sep 10, 2008 at 11:56:47PM +0200, Aurelien Jacobs wrote:
> > > > It shouldn't generate any functional changes, but my vobsub collection
> > > > is not that huge, so I would be glad if someone could check it with other
> > > > samples.
> > > 
> > > MPlayer samples contains a ogg file with vobsub (I do not have the URL at hand right now),
> > > could you test that one? Both with lavf and our demuxer? Thanks.
> > 
> > I've tried to find it, but failed. Then I had a look at various ogg (and ogm)
> > docs and demuxers, and I couldn't find anything regarding vobsub. So to me,
> > it seems that ogg just don't support vobsub track...
> 
> Sorry for the pain, I was confused.

No problem.

> I meant the mov samples here: http://samples.mplayerhq.hu/sub/NeroMP4/

OK. That's an interesting one.
It leads me to discover a bug in current subtitle handling code.
Right now, if you play this file and enable the subtitle on the fly
(with the 'j' key), then everything is find. OTOH, if you try to
play this file with -sid 0, the sub will display fine but without
using the palette specified in the mov container (there is no
visual difference because the palette stored in this file is the
same as our default palette).
The reason is that when using -sid 0, init_vo_spudec() is called
too early, while mpctx->d_sub->sh is still not initialized. So
init_vo_spudec() can't read the palette from it.
The fix is simple (see attached diff), it just ensure
init_vo_spudec() is not called early for embedded subtitles. It is then
called in later part of the code.

With this fix applied, both the original code and the one patched
with vobsub_extradata.diff decode this mov sample correctly, with
both lavf and native demuxer.

Aurel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spuinit.diff
Type: text/x-patch
Size: 524 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080911/1c8b4f91/attachment.bin>


More information about the MPlayer-dev-eng mailing list