vlc | branch: master | Vittorio Giovara <[email protected]> | Mon Sep 
26 23:51:40 2016 -0400| [9f5bf3853fd66435c72a574143db92aad8c63716] | committer: 
Vittorio Giovara

vpx: Simplify table enumeration

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9f5bf3853fd66435c72a574143db92aad8c63716
---

 modules/codec/vpx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index 3149943..ebee86b 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -142,8 +142,6 @@ static const struct
     { VLC_CODEC_I444_12L, VPX_IMG_FMT_I44416, 12, 0 },
 
     { VLC_CODEC_I444_16L, VPX_IMG_FMT_I44416, 16, 0 },
-
-    { 0, 0, 0, 0 },
 };
 
 static vlc_fourcc_t FindVlcChroma( struct vpx_image *img, vpx_codec_caps_t 
codec_caps )
@@ -153,7 +151,7 @@ static vlc_fourcc_t FindVlcChroma( struct vpx_image *img, 
vpx_codec_caps_t codec
     if( img->bit_depth > 8 && !(codec_caps & VPX_CODEC_CAP_HIGHBITDEPTH) )
         return 0;
 
-    for( int i = 0; chroma_table[i].i_chroma != 0; i++ )
+    for( unsigned int i = 0; i < ARRAY_SIZE(chroma_table); i++ )
         if( chroma_table[i].i_chroma_id == img->fmt &&
             chroma_table[i].i_bitdepth == img->bit_depth &&
             chroma_table[i].i_needs_hack == hack )

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to