[MPlayer-dev-eng] [PATCH] Closed Captioning Roll-up mode support (draft)
Vladimir Voroshilov
voroshil at gmail.com
Tue Oct 23 08:54:58 CEST 2007
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.
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scrolling_cc_in_mpeg_14.diff
Type: application/octet-stream
Size: 1845 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071023/5f0ce076/attachment.obj>
More information about the MPlayer-dev-eng
mailing list