[FFmpeg-cvslog] r25689 - trunk/libavcodec/imgconvert.c

stefano subversion
Sun Nov 7 16:04:35 CET 2010


Author: stefano
Date: Sun Nov  7 16:04:35 2010
New Revision: 25689

Log:
Optimize / simplify avcodec_get_pix_fmt_name() check.

Modified:
   trunk/libavcodec/imgconvert.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Sun Nov  7 14:30:39 2010	(r25688)
+++ trunk/libavcodec/imgconvert.c	Sun Nov  7 16:04:35 2010	(r25689)
@@ -419,7 +419,7 @@ void avcodec_get_chroma_sub_sample(enum 
 
 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;



More information about the ffmpeg-cvslog mailing list