[Ffmpeg-devel] Re: [PATCH] fix ffmpeg is killed for some img convert
Limin Wang
lance.lmwang
Fri Apr 6 14:57:19 CEST 2007
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.
Thanks,
Limin
-------------- next part --------------
Index: libavcodec/imgconvert.c
===================================================================
--- libavcodec/imgconvert.c (revision 8633)
+++ libavcodec/imgconvert.c (working copy)
@@ -2542,9 +2542,12 @@
/* 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;
ret = -1;
More information about the ffmpeg-devel
mailing list