aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-27 17:43:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-27 17:43:03 +0200
commit64fb19cc995f4bf13085ae1f871334a8ff336b46 (patch)
tree93593aed1962930f166484ec6647474cd30885f7
parent0f17bc644c4af0f9e0fab714fadf4f4f02140a0e (diff)
downloadffmpeg-64fb19cc995f4bf13085ae1f871334a8ff336b46.tar.gz
avfilter/formats: Avoid using non public AV_PIX_FMT_NB
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/formats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index dbd8bd9803..141390f22c 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);
}