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:
Stefano Sabatini 2010-11-07 15:04:35 +00:00
parent a5f27f6db8
commit 46db10ed0e
1 changed files with 1 additions and 1 deletions

View File

@ -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;