1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

qt-faststart: simplify code by using FFMIN

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-09-30 21:53:26 +02:00
parent 610efb6773
commit 59003fe7c0

View File

@ -303,10 +303,7 @@ int main(int argc, char *argv[])
} }
printf(" copying rest of file...\n"); printf(" copying rest of file...\n");
while (last_offset) { while (last_offset) {
if (last_offset > COPY_BUFFER_SIZE) bytes_to_copy = FFMIN(bytes_to_copy, last_offset);
bytes_to_copy = COPY_BUFFER_SIZE;
else
bytes_to_copy = last_offset;
if (fread(copy_buffer, bytes_to_copy, 1, infile) != 1) { if (fread(copy_buffer, bytes_to_copy, 1, infile) != 1) {
perror(argv[1]); perror(argv[1]);