[MPlayer-cvslog] r19649 - in trunk: libass/ass_mp.c libass/ass_mp.h libmpdemux/demux_mkv.c

Evgeniy Stepanov eugeni.stepanov at gmail.com
Thu Dec 21 22:31:14 CET 2006


On Thursday 21 December 2006 23:25, Uoti Urpala wrote:
> On Sat, 2006-09-02 at 22:46 +0200, eugeni wrote:
> > Modified: trunk/libmpdemux/demux_mkv.c
> > =========================================================================
> >===== static void
> > +clear_subtitles(demuxer_t *demuxer, uint64_t timecode, int clear_all);
> > +
> > +static void
> >
> > @@ -2831,6 +2841,7 @@
> >      ass_process_chunk(track->sh_sub.ass_track, block, size, (long
> > long)timecode, (long long)block_duration); return;
> >    }
> > +  clear_subtitles(demuxer, timecode, 1);
> >  #endif
>
> This results in
>
> #ifdef USE_ASS
>   if (ass_enabled && track->subtitle_type == MATROSKA_SUBTYPE_SSA) {
>     ass_process_chunk(track->sh_sub.ass_track, block, size, (long
> long)timecode, (long long)block_duration); return;
>   }
>   clear_subtitles(demuxer, timecode, 1);
> #endif
>
> Which is nonsense (if USE_ASS is defined modifies behavior when libass
> is NOT used), and breaks display of multiple subtitle packets in that
> case.
>
> Should the clear_subtitles() line be simply removed or did you intend it
> to be somewhere else? It doesn't seem useful anywhere unless you can
> turn libass rendering on during playback though.

It probably should be put under "if (ass_enabled)", could you check if it 
helps ?

handle_subtitles() joins multiple subtitles in mkv_d->subs, which is correct 
for the old subtitles engine. On the other hand, libass wants each subtitle 
separately, that's what clear_subtitles() is for. I admit this is ugly. 
mkv_d->subs should not be used in ASS mode and subtitle parsing should be 
reimplemented in libass. For now, lets put this line under "if 
(ass_enabled)".



More information about the MPlayer-cvslog mailing list