[SCM] libav/experimental: Optimize / simplify avcodec_get_pix_fmt_name() check.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:18:43 UTC 2013
The following commit has been merged in the experimental branch:
commit 46db10ed0e04872eb9b003129f8395005c935ca4
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date: Sun Nov 7 15:04:35 2010 +0000
Optimize / simplify avcodec_get_pix_fmt_name() check.
Originally committed as revision 25689 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 3d7e759..2574ec8 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;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list