[Ffmpeg-devel] Re: [PATCH] fix ffmpeg is killed for some img convert

Limin Wang lance.lmwang
Thu Apr 12 11:52:45 CEST 2007


Hi,

> Hi,
> 
> Update the patch to fix the dead loop recursive function issue, I have pass
> simple test for these be killed image conversion and "make test", please
> review it.

Any comments? The bug can be reproduced by yuv420p -> bgr32 etc.

ffmpeg -s 352x288 -i /home/lmwang/test_sequences/cif/container_cif.yuv
-pix_fmt bgr32 /tmp/1.yuv

I updated the patch with the latest svn and removed one cosmetics change.


Thanks,
Limin


-------------- next part --------------
Index: imgconvert.c
===================================================================
--- imgconvert.c	(revision 8715)
+++ imgconvert.c	(working copy)
@@ -2544,8 +2544,10 @@
         /* the two formats are rgb or gray8 or yuv[j]444p */
         if (src_pix->is_alpha && dst_pix->is_alpha)
             int_pix_fmt = PIX_FMT_RGB32;
+        else if(src_pix_fmt != PIX_FMT_RGB24 )
+            int_pix_fmt = PIX_FMT_RGB24;
         else
-            int_pix_fmt = PIX_FMT_RGB24;
+            return -1;
     }
     if (avpicture_alloc(tmp, int_pix_fmt, dst_width, dst_height) < 0)
         return -1;



More information about the ffmpeg-devel mailing list