[Ffmpeg-cvslog] r7561 - trunk/libavcodec/imgresample.c
Luca Abeni
lucabe72
Thu Jan 18 09:38:27 CET 2007
Hi M?ns and Reimar,
On Wed, 2007-01-17 at 23:13 +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
[...]
> >> 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.
This was my first impression too. But then I saw that libswscale has a
similar check in sws_freeContext(), so this commit is probably good for
consistency reasons.
Anyway, yesterday I wrote an email about the real bug in ffmpeg.c that
needed this commit... (I also provided 2 possible patches fixing that
bug, but after this commit they are not needed anymore :)
Luca
--
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
N O W A R ! ! !
More information about the ffmpeg-cvslog
mailing list