Lines Matching refs:infile
17 * qt-faststart <infile.mov> <outfile.mov>
77 FILE *infile;
95 printf ("Usage: qt-faststart <infile.mov> <outfile.mov>\n");
99 infile = fopen(argv[1], "rb");
100 if (!infile) {
107 while (!feof(infile)) {
108 if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) {
134 fclose(infile);
137 fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR);
138 if (fread(ftyp_atom, atom_size, 1, infile) != 1) {
141 fclose(infile);
144 start_offset = ftello(infile);
150 if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) {
154 fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE * 2, SEEK_CUR);
156 fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR);
162 fclose(infile);
168 fseeko(infile, -atom_size, SEEK_END);
169 last_offset = ftello(infile);
175 fclose(infile);
178 if (fread(moov_atom, atom_size, 1, infile) != 1) {
181 fclose(infile);
190 fclose(infile);
195 fclose(infile);
244 infile = fopen(argv[1], "rb");
245 if (!infile) {
252 fseeko(infile, start_offset, SEEK_SET);
280 /* copy the remainder of the infile, from offset 0 -> last_offset - 1 */
288 if (fread(copy_buffer, bytes_to_copy, 1, infile) != 1) {
300 fclose(infile);
309 fclose(infile);