diff options
| -rw-r--r-- | ezlive_config.c | 1 | ||||
| -rw-r--r-- | main.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ezlive_config.c b/ezlive_config.c index 618c051..34fb6e7 100644 --- a/ezlive_config.c +++ b/ezlive_config.c @@ -43,7 +43,6 @@ bool EZLiveConfig_load(EZLiveConfig *self, const char *filename) { FILE *fp = fopen(filename, "r"); if (!fp) { - perror("fopen"); return false; } @@ -77,7 +77,16 @@ void on_srt_data(void *ctx, char *buf, size_t size) { RingBuffer_write(rb, (const uint8_t*)buf, size); } +void cleantmpfile() { +#ifdef _WIN32 + system("del tmp*"); +#else + system("rm /tmp/ezlive*"); +#endif +} + int main(int argc, char **argv) { + cleantmpfile(); ezlive_config = malloc(sizeof(EZLiveConfig)); EZLiveConfig_init(ezlive_config); bool succ; |
