Problem with ffmpeg-free

Reinhard Tartler siretart at tauware.de
Fri Mar 28 15:29:10 UTC 2008


Christoph Pleger <Christoph.Pleger at uni-dortmund.de> writes:

> Hello,
>
>> +
>> +    if (!c) {
>> +        av_log(c, AV_LOG_ERROR, "swScaler: SwsContext invalid\n");
>> +    }
>
> The problem was not solved. I expected that, as the four lines do not really 
> change anything but add a debugging message. As that message appeared in my 
> standard output, we can now be sure that c being NULL causes the segmentation 
> fault.

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).

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



More information about the pkg-multimedia-maintainers mailing list