OLD | NEW |
1 /* Copyright (c) 2011 Xiph.Org Foundation | 1 /* Copyright (c) 2011 Xiph.Org Foundation |
2 Written by Jean-Marc Valin */ | 2 Written by Jean-Marc Valin */ |
3 /* | 3 /* |
4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
6 are met: | 6 are met: |
7 | 7 |
8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 for (i=1;i<argc-2;i++) | 74 for (i=1;i<argc-2;i++) |
75 { | 75 { |
76 if (strcmp(argv[i], "-merge")==0) | 76 if (strcmp(argv[i], "-merge")==0) |
77 { | 77 { |
78 merge = atoi(argv[i+1]); | 78 merge = atoi(argv[i+1]); |
79 if(merge<1) | 79 if(merge<1) |
80 { | 80 { |
81 fprintf(stderr, "-merge parameter must be at least 1.\n"); | 81 fprintf(stderr, "-merge parameter must be at least 1.\n"); |
82 return EXIT_FAILURE; | 82 return EXIT_FAILURE; |
83 } | 83 } |
| 84 if(merge>48) |
| 85 { |
| 86 fprintf(stderr, "-merge parameter must be less than 48.\n"); |
| 87 return EXIT_FAILURE; |
| 88 } |
84 i++; | 89 i++; |
85 } else if (strcmp(argv[i], "-split")==0) | 90 } else if (strcmp(argv[i], "-split")==0) |
86 split = 1; | 91 split = 1; |
87 else | 92 else |
88 { | 93 { |
89 fprintf(stderr, "Unknown option: %s\n", argv[i]); | 94 fprintf(stderr, "Unknown option: %s\n", argv[i]); |
90 usage(argv[0]); | 95 usage(argv[0]); |
91 return EXIT_FAILURE; | 96 return EXIT_FAILURE; |
92 } | 97 } |
93 } | 98 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 } | 208 } |
204 | 209 |
205 } | 210 } |
206 } | 211 } |
207 } | 212 } |
208 | 213 |
209 fclose(fin); | 214 fclose(fin); |
210 fclose(fout); | 215 fclose(fout); |
211 return EXIT_SUCCESS; | 216 return EXIT_SUCCESS; |
212 } | 217 } |
OLD | NEW |