]> git.sesse.net Git - ffmpeg/commitdiff
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 94eca9bd11e1f5022355b27282e0a772e8c37b73..80ba858b23b019da0fdc3364913d82d47a1bc3f2 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);