From 153fadc390d05aa47e5e2c56290401898fe41a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 6 Oct 2014 17:41:00 +0300 Subject: [PATCH] ff_get_format: fix infinite loop Signed-off-by: Anton Khirnov --- libavcodec/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);