[vlc-devel] [Patch] paddleft pads one line too much

Leif Einar Aune leif.einar.aune at adactus.no
Thu Feb 28 09:50:12 CET 2008


The patch is against the trunk.

Sorry if the mail was unclear about this.

Best Regards
Leif Einar

Jean-Baptiste Kempf wrote:
> please provide a patch against trunk.
>
> On Tue, Feb 26, 2008, Leif Einar Aune wrote :
>   
>> Hi, all
>>
>> When using paddleft when streaming and transcoding I get a segmentation 
>> fault. This is when running vlc-0.8.6d compiled from source on a Fedora 
>> 8 64bit box, as well as CentOs5.1.
>>
>> Looking into the source I think the function fill_pad_region in file 
>> video_filter.c is writing one line too much in the img->data structure.
>>
>> The applied patch solves the problem.
>>
>> It also seems like the last pixels if paddright is specified is not set. 
>> The patch also fixes this (adding the memset after the for loop).
>>
>> Please consider it.
>>
>> Best Regards
>> Leif Einar Aune
>>     
>
>   
>> Index: video_filter.c
>> ===================================================================
>> --- video_filter.c	(revision 25353)
>> +++ video_filter.c	(working copy)
>> @@ -365,11 +365,12 @@
>>              optr = img->data[i] + ( img->linesize[i] * ( padtop >> shift ) ) +
>>                  ( img->linesize[i] - ( padright >> shift ) );
>>  
>> -            for ( y = 0; y < ( ( height - ( padtop + padbottom ) ) >> shift ); y++ )
>> +            for ( y = 1; y < ( ( height - ( padtop + padbottom ) ) >> shift ); y++ )
>>              {
>>                  memset( optr, color[i], ( padleft + padright ) >> shift );
>>                  optr += img->linesize[i];
>>              }
>> +            memset( optr, color[i], padright >> shift );
>>          }
>>  
>>          if (padbottom)
>>     
>
>   
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> http://mailman.videolan.org/listinfo/vlc-devel
>>     
>
> Best Regards,
>
>   




More information about the vlc-devel mailing list