mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
Optimize / simplify avcodec_get_pix_fmt_name() check.
Originally committed as revision 25689 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a5f27f6db8
commit
46db10ed0e
@ -419,7 +419,7 @@ void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *
|
||||
|
||||
const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt)
|
||||
{
|
||||
if (pix_fmt < 0 || pix_fmt >= PIX_FMT_NB)
|
||||
if ((unsigned)pix_fmt >= PIX_FMT_NB)
|
||||
return NULL;
|
||||
else
|
||||
return av_pix_fmt_descriptors[pix_fmt].name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user