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

Andrew Calkin andrew.calkin at gmail.com
Tue Oct 23 05:30:46 CEST 2007


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);

//Andrew



More information about the MPlayer-dev-eng mailing list