[MPlayer-cvslog] r20162 - in trunk: help/help_mp-en.h libmpdemux/demux_mkv.c libmpdemux/matroska.h mplayer.c stream/stream_dvd.c stream/stream_dvd.h

Paul TT paultt at hackerjournal.it
Thu Oct 12 15:54:33 CEST 2006


> On Wed, Oct 11, 2006 at 07:57:16PM +0200, Reimar Döffinger wrote:

sorry, i wasn't subscribed to -cvslog, now i am, so answer follows :-)

> > On Wed, Oct 11, 2006 at 07:25:46PM +0200, ptt wrote:
> > > Log:
> > > added OSD audio switching visualization
> > 
> > I would have appreciated a warning before applying.

mail of 2006/10/08 "[PATCH] OSD: audio switching visualization::5th try"
and thread between between 2006/02/07 and 24 with same subject, but
was "4th try"
i had only reformatted the patch to apply to svn version now going on.
:-)
 
i'll make the changes you suggested, you're right everywhere. :-)
primarily the /wrong/ things came out because i copied+paste the code
previously used to notify the subtitles language change and adapted
for audio language...


> > > +  num = 0;
> > > +  for (i = 0; i < mkv_d->num_tracks; i++)
> > > +    {
> > > +      track = mkv_d->tracks[i];
> > > +      if (track->type == MATROSKA_TRACK_AUDIO)
> > > +        num++;
> > > +      if (num == (track_num + 1))
> > 
> > demux_mkv_find_track_by_num ??

thanx, i'll put that function :-)

> > > +            char lang[40] = MSGTR_Unknown;
> > > +            demux_mkv_get_audio_lang(demuxer, audio_id, lang, 9);
> >
> > Why 9? 20 would still be safe or is there anything that guarantees a
> > valid mkv will not have more? 9 might just be enough for only 2
> > unicode characters...

really don't know, but for subtitle language decoding (lines 2111-2114
in mplayer.c) the same is done, so i copied it.
indeed i think you can be right about the length...

> > 
> > > +            char lang[3] = "\0\0\0";
> > 
> > Hmm. Is this a actually valid C? Also, just removing the if(code)
> > below and adding lang[2] = 0 would work as well.

(i think it is, valid i mean)
the same applies here (mplayer.c:2136-2143, but here there is a
lang[2]=0 added, i'll add that to be done in the same way)

anyway, i think you're right about these 2 points, make modifications if
you think it's right too; the only thing i'm poining out it's that
(probably) subtitle lang decoding and audio lang decoding should work in
the same way...
as alben bedel said on 2005/12/01, anyway, it should be done a single
interface for switching subs/audio lang, but i'll think about it later
on...

> > Greetings,
> > Reimar Döffinger
bye ,thanx

PS: sorry if i've been too long...



More information about the MPlayer-cvslog mailing list