comparison libmpcodecs/vf_scale.c @ 30365:be05cd2be61a

Simplify loop condition
author reimar
date Sat, 23 Jan 2010 18:28:47 +0000
parents 16c71b965952
children 81bebbcb2de4
comparison
equal deleted inserted replaced
30364:bdf8e23db3f6 30365:be05cd2be61a
98 static unsigned int find_best_out(vf_instance_t *vf){ 98 static unsigned int find_best_out(vf_instance_t *vf){
99 unsigned int best=0; 99 unsigned int best=0;
100 int i; 100 int i;
101 101
102 // find the best outfmt: 102 // find the best outfmt:
103 for(i=0; i<sizeof(outfmt_list)/sizeof(int)-1; i++){ 103 for(i=0; outfmt_list[i]; i++){
104 const int format= outfmt_list[i]; 104 const int format= outfmt_list[i];
105 int ret= vf->priv->query_format_cache[i]-1; 105 int ret= vf->priv->query_format_cache[i]-1;
106 if(ret == -1){ 106 if(ret == -1){
107 ret= vf_next_query_format(vf, outfmt_list[i]); 107 ret= vf_next_query_format(vf, outfmt_list[i]);
108 vf->priv->query_format_cache[i]= ret+1; 108 vf->priv->query_format_cache[i]= ret+1;