[MPlayer-dev-eng] [PATCH] Make all subtitles availiable
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Dec 10 14:25:03 CET 2006
Hello,
On Sun, Dec 10, 2006 at 01:55:32PM +0100, Lehel Bernadt wrote:
> On Monday 04 December 2006 23:51, Guillaume POIRIER wrote:
> > > It might affect the correct working of frontends.
> > > Nevertheless in this case I agree it is a different issue not directly
> > > related to this, so I don't have any further objections to the patch.
> > > Would be nice to see those ID_SUBTITLE_ID messages "fixed" (according to
> > > what I consider correct) anyway though.
> >
> > Ok, very nice to hear; Lehel, fire up your mencoder patch, I'll test
> > it and hopefully commit both patches (as I said earlier, mencoder and
> > mplayer need to behave the same so that dumping vobsubs works in a
> > deterministic way).
>
> Finally i had the time to deal with this... so here are 2 patches, one for
> fixing the subtitle selection in both mplayer.c and mencoder.c, and the other
> correcting the identify output to be consistent with the sid numbers as
> suggested by Reimar.
Second one is applied.
> --- mplayer/mencoder.c 2006-12-10 13:46:54.656984695 +0100
> +++ mplayer-mine/mencoder.c 2006-12-10 13:50:06.767779415 +0100
> @@ -571,6 +571,8 @@
> if(stream->type==STREAMTYPE_DVD){
> if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
> if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
> + // switch to the spu id
> + dvdsub_id = ((dvd_priv_t*)stream->priv)->subtitles[dvdsub_id].id;
> }
> #endif
>
> diff -urN mplayer/mplayer.c mplayer-mine/mplayer.c
> --- mplayer/mplayer.c 2006-12-10 13:46:54.633988191 +0100
> +++ mplayer-mine/mplayer.c 2006-12-10 13:50:06.773778503 +0100
> @@ -2341,7 +2341,9 @@
> if (d_dvdsub) {
> #ifdef USE_DVDREAD
> if (vo_spudec && stream->type == STREAMTYPE_DVD) {
> - d_dvdsub->id = dvdsub_id;
> + // d_dvdsub->id is the spu stream to be selected
> + // dvdsub_id contains the -sid value
> + d_dvdsub->id = ((dvd_priv_t*)stream->priv)->subtitles[dvdsub_id].id;
Are you sure it is correct that once it is d_dvdsub->id and once
dvdsub_id that gets the spu id? That seems likely to break embedded
subtitles...
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list