ff_get_format: fix infinite loop
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 6 Oct 2014 14:41:00 +0000 (17:41 +0300)
committerAnton Khirnov <anton@khirnov.net>
Mon, 6 Oct 2014 18:39:45 +0000 (18:39 +0000)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/utils.c

index 94eca9b..80ba858 100644 (file)
@@ -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);