OSDN Git Service

Merge commit 'ea15a9a5d8fa6a71af3101b2af18c4dcac07987f'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Mar 2014 12:47:08 +0000 (13:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Mar 2014 12:47:08 +0000 (13:47 +0100)
* commit 'ea15a9a5d8fa6a71af3101b2af18c4dcac07987f':
  qt-faststart: Simplify code by using a MIN() macro

Conflicts:
tools/qt-faststart.c

See: 59003fe7c064e98359cce83b1b727fb1026bdf12
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
tools/qt-faststart.c

@@@ -316,15 -295,9 +316,15 @@@ int main(int argc, char *argv[]
      }
  
      /* copy the remainder of the infile, from offset 0 -> last_offset - 1 */
-     bytes_to_copy = FFMIN(COPY_BUFFER_SIZE, last_offset);
++    bytes_to_copy = MIN(COPY_BUFFER_SIZE, last_offset);
 +    copy_buffer = malloc(bytes_to_copy);
 +    if (!copy_buffer) {
 +        printf("could not allocate %d bytes for copy_buffer\n", bytes_to_copy);
 +        goto error_out;
 +    }
      printf(" copying rest of file...\n");
      while (last_offset) {
-         bytes_to_copy = FFMIN(bytes_to_copy, last_offset);
 -        bytes_to_copy = MIN(COPY_BUFFER_SIZE, last_offset);
++        bytes_to_copy = MIN(bytes_to_copy, last_offset);
  
          if (fread(copy_buffer, bytes_to_copy, 1, infile) != 1) {
              perror(argv[1]);