[Ffmpeg-cvslog] r7561 - trunk/libavcodec/imgresample.c

Måns Rullgård mru
Thu Jan 18 00:13:28 CET 2007


Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:

> Hello,
> On Wed, Jan 17, 2007 at 11:26:14AM +0100, takis wrote:
>> Author: takis
>> Date: Wed Jan 17 11:26:13 2007
>> New Revision: 7561
>> 
>> Modified:
>>    trunk/libavcodec/imgresample.c
>> 
>> Log:
>> fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.ogm and
>> http://sam.zoy.org/zzuf/lol-ffplay.ogg
>> 
>> 
>> Modified: trunk/libavcodec/imgresample.c
>> ==============================================================================
>> --- trunk/libavcodec/imgresample.c	(original)
>> +++ trunk/libavcodec/imgresample.c	Wed Jan 17 11:26:13 2007
>> @@ -672,6 +672,8 @@
>>  
>>  void sws_freeContext(struct SwsContext *ctx)
>>  {
>> +    if (!ctx)
>> +        return;
>
> I have a somewhat bad feeling about this, it seems probable to me that
> this just masks a real bug/problem/stupid code...

That's exactly my opinion too on checks for conditions that should
never happen, especially when the action is to silently ignore the bad
condition.  If something has gone wrong it's better to crash with a
nice hard core dump as soon as possible rather than have random memory
corruption result mysterious things happening much later.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-cvslog mailing list