avfilter/vf_hflip: Don't call av_pix_fmt_desc_get() twice

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/369/head
Andreas Rheinhardt 3 years ago
parent 73a59ed1cb
commit d8ca8bec26
  1. 4
      libavfilter/vf_hflip.c

@ -46,10 +46,10 @@ AVFILTER_DEFINE_CLASS(hflip);
static int query_formats(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx)
{ {
AVFilterFormats *pix_fmts = NULL; AVFilterFormats *pix_fmts = NULL;
const AVPixFmtDescriptor *desc;
int fmt, ret; int fmt, ret;
for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) { for (fmt = 0; desc = av_pix_fmt_desc_get(fmt); fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL || if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
desc->flags & AV_PIX_FMT_FLAG_BITSTREAM || desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ||
(desc->log2_chroma_w != desc->log2_chroma_h && (desc->log2_chroma_w != desc->log2_chroma_h &&

Loading…
Cancel
Save