[MPlayer-dev-eng] [PATCH] set subtitle type in mpg demuxer
Nico Sabbi
nicola_sabbi at fastwebnet.it
Sun Jun 17 12:13:45 CEST 2007
Reimar Doeffinger wrote:
> Hello,
> attached patch does this, this seems to fix subtitle switching with
> vobs. Another way to do this would be to just set it to 'v' in
> new_sh_sid by default, or do both.
> What is your opinion?
>
> Greetings,
> Reimar Doeffinger
>
>
> ------------------------------------------------------------------------
>
> Index: libmpdemux/demux_mpg.c
> ===================================================================
> --- libmpdemux/demux_mpg.c (revision 23569)
> +++ libmpdemux/demux_mpg.c (working copy)
> @@ -423,8 +423,9 @@
> aid&=0x1F;
>
> if(!demux->s_streams[aid]){
> + sh_sub_t *sh = new_sh_sub(demux, aid);
> + if (sh) sh->type = 'v';
> mp_msg(MSGT_DEMUX,MSGL_V,"==> Found subtitle: %d\n",aid);
> - new_sh_sub(demux, aid);
> }
>
> if(demux->sub->id > -1)
>
the demuxer knows the subtitle type better, so your patch is the right
way to go, IMO.
More information about the MPlayer-dev-eng
mailing list