[FFmpeg-cvslog] qt-faststart: simplify code by using FFMIN

Michael Niedermayer git at videolan.org
Sun Sep 30 22:21:11 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 30 21:53:26 2012 +0200| [59003fe7c064e98359cce83b1b727fb1026bdf12] | committer: Michael Niedermayer

qt-faststart: simplify code by using FFMIN

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59003fe7c064e98359cce83b1b727fb1026bdf12
---

 tools/qt-faststart.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index b1917f1..b9dbdfd 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -303,10 +303,7 @@ int main(int argc, char *argv[])
     }
     printf(" copying rest of file...\n");
     while (last_offset) {
-        if (last_offset > COPY_BUFFER_SIZE)
-            bytes_to_copy = COPY_BUFFER_SIZE;
-        else
-            bytes_to_copy = last_offset;
+        bytes_to_copy = FFMIN(bytes_to_copy, last_offset);
 
         if (fread(copy_buffer, bytes_to_copy, 1, infile) != 1) {
             perror(argv[1]);



More information about the ffmpeg-cvslog mailing list