[Ffmpeg-devel] [PATCH] Fix for the lol-ffplay.ogm testcase
Panagiotis Issaris
takis.issaris
Wed Jan 17 11:35:51 CET 2007
Hi Luca,
On Wed, 2007-01-17 at 11:28 +0100, Luca Abeni wrote:
> Hi Takis,
>
> On Wed, 2007-01-17 at 10:40 +0100, Panagiotis Issaris wrote:
> > Hi,
> >
> > Attached are two trivial patches with different approaches to prevent
> > the segfault as demonstrated by lol-ffplay.ogm.
>
> [...]
> - if (ost->video_resample)
> + if (ost->video_resample && ost->img_resample_ctx)
> sws_freeContext(ost->img_resample_ctx);
> I think the real bug here is that ost->video_resample != 0, but
> ost->img_resample_ctx == NULL. So, this looks more a workarond than a
> real fix. I suspect the problem is a missing check for errors
> somewhere... I'll have a look later.
Yes, you are right.
> [...]
> void sws_freeContext(struct SwsContext *ctx)
> {
> + if (!ctx)
> + return;
> I do not know if calling sws_freeContext(NULL) is a bug or not... So,
> maybe committing this code is the right thing to do.
Thanks, committed.
> But I'd prefer to fix the calling code anyway. I'll check ffmpeg.c
> during the lunch break.
Excellent! :)
With friendly regards,
Takis
--
vCard: http://www.issaris.org/pi.vcf
Public key: http://www.issaris.org/pi.key
More information about the ffmpeg-devel
mailing list