diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-06-21 01:05:30 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-06-21 01:05:30 +0000 |
commit | 91a4abd8f544219ce85fb1b1ced9f1389d94faaa (patch) | |
tree | e6b5a586e52122303b30e12fdf71a1e5a373d5da /tools | |
parent | cf3b4d9a784982fbd861093c48fe8e924bf88f1e (diff) | |
download | ffmpeg-91a4abd8f544219ce85fb1b1ced9f1389d94faaa.tar.gz |
fail if input and output are the same
Originally committed as revision 23672 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qt-faststart.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 7bcd5b72bd..ace4c113c8 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -27,6 +27,7 @@ #include <stdio.h> #include <stdlib.h> #include <inttypes.h> +#include <string.h> #ifdef __MINGW32__ #define fseeko(x,y,z) fseeko64(x,y,z) @@ -98,6 +99,11 @@ int main(int argc, char *argv[]) return 0; } + if (!strcmp(argv[1], argv[2])) { + fprintf(stderr, "input and output files need to be different\n"); + return 1; + } + infile = fopen(argv[1], "rb"); if (!infile) { perror(argv[1]); |