[SCM] libav/experimental: avoid infinite loop if pixel format conversion does not exist

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:10:35 UTC 2013


The following commit has been merged in the experimental branch:
commit 86404ffba2d8795d44cffbbeee3b3c7c2cc6afcc
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Tue Dec 18 13:49:58 2007 +0000

    avoid infinite loop if pixel format conversion does not exist
    
    Originally committed as revision 11259 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 0299dbb..229a3a3 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -2555,6 +2555,8 @@ int img_convert(AVPicture *dst, int dst_pix_fmt,
         else
             int_pix_fmt = PIX_FMT_RGB24;
     }
+    if (src_pix_fmt == int_pix_fmt)
+        return -1;
     if (avpicture_alloc(tmp, int_pix_fmt, dst_width, dst_height) < 0)
         return -1;
     ret = -1;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list