[MPlayer-dev-eng] [PATCH] DVD subtitle switching
Nico Sabbi
nicola_sabbi at fastwebnet.it
Mon Sep 11 23:19:29 CEST 2006
Lehel Bernadt wrote:
>Hello,
>
>Last year I provided a patch that fixed the DVD subtitle/audio stream mapping,
>but a pretty simple part of it with changes in mplayer.c didn't get applied
>at that time.
>
>So i'm submitting it again, it just fixes the switching of subtitles to follow
>the mapping.
>
>Best wishes,
>Lehel
>
>
>------------------------------------------------------------------------
>
>diff -urN mplayer-svn/mplayer.c mplayer-mine/mplayer.c
>--- mplayer-svn/mplayer.c 2006-09-11 22:16:50.548659704 +0200
>+++ mplayer-mine/mplayer.c 2006-09-11 22:16:41.000000000 +0200
>@@ -2150,7 +2150,9 @@
> if (d_dvdsub) {
> #ifdef USE_DVDREAD
> if (vo_spudec && stream->type == STREAMTYPE_DVD) {
>- d_dvdsub->id = dvdsub_id;
>+ // dvdsub_id contains the -sid value (logical stream id)
>+ // d_dvdsub->id contains the SPU stream id
>+ d_dvdsub->id = ((dvd_priv_t*)stream->priv)->subtitles[dvdsub_id].id;
> spudec_reset(vo_spudec);
> }
> #endif
>
>
>------------------------------------------------------------------------
>
dereferencing stream's priv members is very ugly
More information about the MPlayer-dev-eng
mailing list