[FFmpeg-cvslog] avconv_opt: Consistently iterate through hwaccels array in all cases

Diego Biurrun git at videolan.org
Fri Mar 31 22:47:36 EEST 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Sun Dec  6 13:04:05 2015 +0100| [01348e411f962f5e4605d649fc9a47a54587ba8e] | committer: Diego Biurrun

avconv_opt: Consistently iterate through hwaccels array in all cases

avconv_opt.c:188:19: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01348e411f962f5e4605d649fc9a47a54587ba8e
---

 avconv_opt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/avconv_opt.c b/avconv_opt.c
index 1064cf4..4d7140d 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -190,7 +190,7 @@ static int show_hwaccels(void *optctx, const char *opt, const char *arg)
     int i;
 
     printf("Supported hardware acceleration:\n");
-    for (i = 0; i < FF_ARRAY_ELEMS(hwaccels) - 1; i++) {
+    for (i = 0; hwaccels[i].name; i++) {
         printf("%s\n", hwaccels[i].name);
     }
     printf("\n");



More information about the ffmpeg-cvslog mailing list