[FFmpeg-cvslog] avfilter/formats: Avoid using non public AV_PIX_FMT_NB
Michael Niedermayer
git at videolan.org
Tue May 27 18:00:15 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 27 17:43:03 2014 +0200| [64fb19cc995f4bf13085ae1f871334a8ff336b46] | committer: Michael Niedermayer
avfilter/formats: Avoid using non public AV_PIX_FMT_NB
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64fb19cc995f4bf13085ae1f871334a8ff336b46
---
libavfilter/formats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index dbd8bd9..141390f 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -572,7 +572,7 @@ int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ct
int pix_fmt = av_get_pix_fmt(arg);
if (pix_fmt == AV_PIX_FMT_NONE) {
pix_fmt = strtol(arg, &tail, 0);
- if (*tail || (unsigned)pix_fmt >= AV_PIX_FMT_NB) {
+ if (*tail || !av_pix_fmt_desc_get(pix_fmt)) {
av_log(log_ctx, AV_LOG_ERROR, "Invalid pixel format '%s'\n", arg);
return AVERROR(EINVAL);
}
More information about the ffmpeg-cvslog
mailing list