[MPlayer-dev-eng] [PATCH] Make all subtitles availiable

Nico Sabbi nicola_sabbi at fastwebnet.it
Sun Dec 10 17:07:41 CET 2006


Lehel Bernadt wrote:

>>>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...
> 
> 
> Well theoretically dvdsub_id should get the spu id in mplayer.c as well... but 
> that would seriously break things, since dvdsub_id is also used as an index 
> into the set_of_subtitles array. That's why i left it with the sid value, and 
> fortunately it's not used in any other way, because its value is assigned to 
> d_dvdsub->id before the sub display. And that's where my patch comes in.
> 
> Now in mencoder.c, this assignment is not done, so i had to change dvdsub_id 
> itself, but here this change poses no problem. And d_dvdsub->id is not used 
> in mencoder.c at all.
> 
> So basically two different executables, two different approaches. I know it's 
> a bit confusing, but i think for a more consistent code a redesign of the 
> subtitle system would be needed.
> 
> Best wishes,
> Lehel

this patch is very very hackish.
This whole confusion on the dvdsub streams leads me to believe that 
the introduction of the global_sub stuff in mplayer made things worse 
rather than better

-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users



More information about the MPlayer-dev-eng mailing list