[FFmpeg-devel] [PATCH] param check in sws_getCachedContext()
KO Myung-Hun
komh
Wed Jan 16 16:15:23 CET 2008
Hi/2.
Michael Niedermayer wrote:
> On Wed, Jan 09, 2008 at 07:15:19PM +0900, KO Myung-Hun wrote:
>
>> Hi/2.
>>
>> sws_getCachecContext() always calls sws_getContext() if 'param' is NULL
>> or its address is changed.
>>
>> So, 'param' should be checked as the patch.
>>
>> --
>> KO Myung-Hun
>>
>> Using Mozilla SeaMonkey 1.1.7
>> Under OS/2 Warp 4 for Korean with FixPak #15
>> On AMD ThunderBird 750 MHz with 512 MB RAM
>>
>> Korean OS/2 User Community : http://www.ecomstation.co.kr
>>
>>
>>
>
>
>> Index: libswscale/swscale.c
>> ===================================================================
>> --- libswscale/swscale.c (revision 25625)
>> +++ libswscale/swscale.c (working copy)
>> @@ -2964,7 +2964,8 @@
>> (context->srcFormat != srcFormat) ||
>> (context->dstW != dstW) || (context->dstH != dstH) ||
>> (context->dstFormat != dstFormat) || (context->flags != flags) ||
>> - (context->param != param))
>> + (param && (( context->param[ 0 ] != param[ 0 ] ) || ( context->param[ 1 ] != param[ 1 ] ))) ||
>> + (!param && (( context->param[ 0 ] != SWS_PARAM_DEFAULT ) || ( context->param[ 1 ] != SWS_PARAM_DEFAULT ))))
>> {
>>
>
> i think
> double default_param[2]= {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT};
> if(!param){
> param= default_param;
>
> and
>
> memcmp(context->param, param, sizeof(context->param))
>
> to be clearer
>
Ah, good.
How about this ?
--
KO Myung-Hun
Using Mozilla SeaMonkey 1.1.7
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 750 MHz with 512 MB RAM
Korean OS/2 User Community : http://www.ecomstation.co.kr
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: swscale.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080117/573e8e04/attachment.asc>
More information about the ffmpeg-devel
mailing list