diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-05-24 11:15:15 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-05-26 22:25:41 +0200 |
commit | b03b2d86aa9d79670825b42d8a8a7c41f59cb444 (patch) | |
tree | 5365aa916328cb369fb0749a4be8bbe968bffacb /libavfilter/buffersrc.c | |
parent | a7d070acb55c3ebbdd5e93e3366f32865732b8a3 (diff) | |
download | ffmpeg-b03b2d86aa9d79670825b42d8a8a7c41f59cb444.tar.gz |
buffersrc: avoid using AV_PIX_FMT_NB
That hardcodes the number of pixel formats into lavfi and will break
when a shared lavu is updated, adding new pixel formats.
Diffstat (limited to 'libavfilter/buffersrc.c')
-rw-r--r-- | libavfilter/buffersrc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 480dca99a6..00e28f8fd3 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -264,7 +264,7 @@ static av_cold int init_video(AVFilterContext *ctx) if ((c->pix_fmt = av_get_pix_fmt(c->pix_fmt_str)) == AV_PIX_FMT_NONE) { char *tail; c->pix_fmt = strtol(c->pix_fmt_str, &tail, 10); - if (*tail || c->pix_fmt < 0 || c->pix_fmt >= AV_PIX_FMT_NB) { + if (*tail || c->pix_fmt < 0 || !av_pix_fmt_desc_get(c->pix_fmt)) { av_log(ctx, AV_LOG_ERROR, "Invalid pixel format string '%s'\n", c->pix_fmt_str); return AVERROR(EINVAL); } |