mirror of https://git.ffmpeg.org/ffmpeg.git
fail if input and output are the same
Originally committed as revision 23672 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
cf3b4d9a78
commit
91a4abd8f5
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue