diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 94eca9bd11..80ba858b23 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -973,7 +973,7 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt) do choices[n] = choices[n + 1]; - while (choices[n] != AV_PIX_FMT_NONE); + while (choices[n++] != AV_PIX_FMT_NONE); } av_freep(&choices);