[MPlayer-dev-eng] [PATCH] Closed Captioning Roll-up mode support (draft)

Vladimir Voroshilov voroshil at gmail.com
Wed Oct 24 09:25:58 CEST 2007


2007/10/23, Vladimir Voroshilov <voroshil at gmail.com>:
> 2007/10/23, Andrew Calkin <andrew.calkin at gmail.com>:
> > On Tue, Oct 23, 2007 at 09:57:18AM +0700, Vladimir Voroshilov wrote:
> > >  void subcc_init(void)
> > >  {
> > >       int i;
> > > @@ -90,7 +118,14 @@
> > >       if(c=='\n')
> > >       {
> > >               if(cursor_pos>0 && bb->lines < SUB_MAX_TEXT)
> > > +             {
> > >                       bb->lines++;cursor_pos=0;
> > > +                     if(cc_mode==CC_ROLLUP){ //Carriage return - scroll buffer one line up
> > > +                             bb->text[bb->lines - 1]=malloc(CC_MAX_LINE_LENGTH);
> > > +                             memset(bb->text[bb->lines - 1],0,CC_MAX_LINE_LENGTH);
> >
> > How about:
> >                 bb->text[bb->lines - 1]=calloc(1, CC_MAX_LINE_LENGTH);
> >
>
> Obviously better.
>

With no objections i'll aplly patch at Saturday.



-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719



More information about the MPlayer-dev-eng mailing list