文件的删除与重命名

  • avpriv_io_delete() 删除文件
  • avpriv_io_move() 重命名 ```cpp

    include

    include

int main() { int ret = -1; av_log_set_level(AV_LOG_ERROR); //url串 ret = avpriv_io_delete(“./mytest.txt”); if (ret < 0) { av_log(NULL, AV_LOG_ERROR, “Failed to delete file metestfile.txt\n”); return -1; }
return 0; }

编译: gcc ffmpeg_delete.c -lavformat -lavutil -o ffmpeg_delete ``` 注:新版本未找到该接口,可能被移除掉了,可以直接调用系统函数