OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 static void print_md5(FILE *stream, unsigned char digest[16]) { | 65 static void print_md5(FILE *stream, unsigned char digest[16]) { |
66 int i; | 66 int i; |
67 | 67 |
68 for (i = 0; i < 16; ++i) | 68 for (i = 0; i < 16; ++i) |
69 fprintf(stream, "%02x", digest[i]); | 69 fprintf(stream, "%02x", digest[i]); |
70 } | 70 } |
71 | 71 |
72 static const char *exec_name; | 72 static const char *exec_name; |
73 | 73 |
74 void usage_exit() { | 74 void usage_exit(void) { |
75 fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name); | 75 fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name); |
76 exit(EXIT_FAILURE); | 76 exit(EXIT_FAILURE); |
77 } | 77 } |
78 | 78 |
79 int main(int argc, char **argv) { | 79 int main(int argc, char **argv) { |
80 int frame_cnt = 0; | 80 int frame_cnt = 0; |
81 FILE *outfile = NULL; | 81 FILE *outfile = NULL; |
82 vpx_codec_ctx_t codec; | 82 vpx_codec_ctx_t codec; |
83 VpxVideoReader *reader = NULL; | 83 VpxVideoReader *reader = NULL; |
84 const VpxVideoInfo *info = NULL; | 84 const VpxVideoInfo *info = NULL; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 printf("Processed %d frames.\n", frame_cnt); | 129 printf("Processed %d frames.\n", frame_cnt); |
130 if (vpx_codec_destroy(&codec)) | 130 if (vpx_codec_destroy(&codec)) |
131 die_codec(&codec, "Failed to destroy codec."); | 131 die_codec(&codec, "Failed to destroy codec."); |
132 | 132 |
133 vpx_video_reader_close(reader); | 133 vpx_video_reader_close(reader); |
134 | 134 |
135 fclose(outfile); | 135 fclose(outfile); |
136 return EXIT_SUCCESS; | 136 return EXIT_SUCCESS; |
137 } | 137 } |
OLD | NEW |