Problem with ffmpeg-free
Reinhard Tartler
siretart at tauware.de
Fri Mar 28 16:09:32 UTC 2008
Christoph Pleger <Christoph.Pleger at uni-dortmund.de> writes:
> 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.
I don't think so. The function will always crash with the parameter c
being 0, because the pointer is being dereferenced in the very next
line.
> 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.
It seems to me that this particular codepath is never reached with
marillats ffmpeg. Interesting question now is of course why.
> 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.
I'm not familiar with the code here. Perhaps you should ask this on the
ffmeg mailing list?
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
More information about the pkg-multimedia-maintainers
mailing list