changeset 6040:08e4fbdbf554 libavcodec

avoid infinite loop if pixel format conversion does not exist
author bcoudurier
date Tue, 18 Dec 2007 13:49:58 +0000
parents b4d22e42528c
children bb4b486c6775
files imgconvert.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Mon Dec 17 19:29:13 2007 +0000
+++ b/imgconvert.c	Tue Dec 18 13:49:58 2007 +0000
@@ -2555,6 +2555,8 @@
         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;