Problem with ffmpeg-free
Christoph Pleger
Christoph.Pleger at uni-dortmund.de
Fri Mar 28 15:58:09 UTC 2008
Hello,
> arg, a return statement is missing here, I'm sorry. Retry with this
> patch:
>
> Index: ffmpeg.20080206/libswscale/swscale.c
> ===================================================================
> --- ffmpeg.20080206.orig/libswscale/swscale.c 2008-03-28
> 12:45:33.000000000 +0100
> +++ ffmpeg.20080206/libswscale/swscale.c 2008-03-28
> 16:25:24.000000000 +0100
> @@ -2529,6 +2529,11 @@
> int i;
> uint8_t* src2[4]= {src[0], src[1], src[2]};
> uint32_t pal[256];
> +
> + if (!c) {
> + av_log(c, AV_LOG_ERROR, "swScaler: SwsContext invalid\n");
> + return 0;
> + }
> if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH !=
> c->srcH) { av_log(c, AV_LOG_ERROR, "swScaler: slices start in the
> middle!\n"); return 0;
>
> But since you've said that you've seen the message, I'm confident that
> this patch will work (the segfault obviously occured after the message).
I will try with that patch, but I wonder if it changes the behaviour of
libswscale in a way that it should not. What makes me doubt is that I just
compared your version of function sws_scale with the version from
www.debian-multimedia.org - and at least the first few lines look exactly the
same. Maybe the reason for the segfault is not a missing error handling for
the case when c is NULL, but the fact that c IS NULL.
Regards
Christoph
More information about the pkg-multimedia-maintainers
mailing list