mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avoid infinite loop if pixel format conversion does not exist
Originally committed as revision 11259 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
fe9bb34766
commit
86404ffba2
@ -2555,6 +2555,8 @@ int img_convert(AVPicture *dst, int dst_pix_fmt,
|
|||||||
else
|
else
|
||||||
int_pix_fmt = PIX_FMT_RGB24;
|
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)
|
if (avpicture_alloc(tmp, int_pix_fmt, dst_width, dst_height) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user