Last active
November 9, 2023 10:42
-
-
Save Janet-Baker/861b5606f9c73e4004dd53a35196e428 to your computer and use it in GitHub Desktop.
some programs use ffmpeg to copy video that we do not want, removeing ffmpeg.exe will cause some unintended error, so we use this fake ffmpeg to avoid that.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
if (argc < 2) { | |
printf("!!!DDTV DO NOT copy my files!!!\nUsage: \nMove this program to plugins/ffmpeg/ffmpeg.exe\n"); | |
return 1; | |
} | |
char *input = NULL; | |
for (int i = 0; i < argc - 1; ++i) { | |
if (argv[i][0] == '-') { | |
if (argv[i][1] == 'i') { | |
input = argv[i + 1]; | |
break; | |
} | |
} | |
} | |
if (NULL == input) { | |
printf("Can not find input file\n"); | |
return 2; | |
} | |
char *output = argv[argc - 1]; | |
return rename(input, output); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a Golang version, which will get a too large product.