[FFmpeg-devel] Patch: fix ffplay segmentation fault

avcoder ffmpeg
Mon Mar 23 08:30:09 CET 2009


Dear:

It seems that the recent swscale development has broken ffplay

the following patch/hack will fix it

Index: swscale.c
===================================================================
--- swscale.c	??? 29040?
+++ swscale.c	??????
@@ -2120,7 +2120,7 @@
         if (!dst[plane]) continue;
         // ignore palette for GRAY8
         if (plane == 1 && !dst[2]) continue;
-        if (!src[plane] || (plane == 1 && !src[2]))
+        if (dst[plane] && (!src[plane] || (plane == 1 && !src[2])))
             fillPlane(dst[plane], dstStride[plane], length, height,
y, (plane==3) ? 255 : 128);
         else
         {


Index: ffplay.c
===================================================================
--- ffplay.c	??? 18169?
+++ ffplay.c	??????
@@ -1242,6 +1242,7 @@
         return -1;

     vp = &is->pictq[is->pictq_windex];
+    memset(&pict,0,sizeof(AVPicture));

     /* alloc or resize hardware picture buffer */
     if (!vp->bmp ||

-- 
----------------------------------------------
Inspired by http://ppnext.com
 Your potential. Our passion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffplay.diff
Type: application/octet-stream
Size: 340 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090323/4d5e2337/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscale.diff
Type: application/octet-stream
Size: 530 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090323/4d5e2337/attachment-0001.obj>



More information about the ffmpeg-devel mailing list