diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-12-18 13:49:58 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-12-18 13:49:58 +0000 |
commit | 86404ffba2d8795d44cffbbeee3b3c7c2cc6afcc (patch) | |
tree | 414a30c7041b326b5c43bf8ec1b0f18fdb375879 /libavcodec | |
parent | fe9bb34766f87b5060c0a5628795fb8f438dafe1 (diff) | |
download | ffmpeg-86404ffba2d8795d44cffbbeee3b3c7c2cc6afcc.tar.gz |
avoid infinite loop if pixel format conversion does not exist
Originally committed as revision 11259 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/imgconvert.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 0299dbb593..229a3a3a0c 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; |