diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-07 15:04:35 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-07 15:04:35 +0000 |
commit | 46db10ed0e04872eb9b003129f8395005c935ca4 (patch) | |
tree | 90f2f74ed41e7a29d0bb22c7fdbfd355ad619615 | |
parent | a5f27f6db8e09d6f2897e80d88c96016c808acd7 (diff) | |
download | ffmpeg-46db10ed0e04872eb9b003129f8395005c935ca4.tar.gz |
Optimize / simplify avcodec_get_pix_fmt_name() check.
Originally committed as revision 25689 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/imgconvert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 3d7e7598a4..2574ec8fcc 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -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; |