| 43 | } |
| 44 | |
| 45 | FileHandle::FileHandle(const char *filename, const char *mode, int error_source, int error_cause) |
| 46 | : avio(ffms_fopen(filename, mode)) |
| 47 | , filename(filename) |
| 48 | , error_source(error_source) |
| 49 | , error_cause(error_cause) { |
| 50 | if (!avio) |
| 51 | throw FFMS_Exception(error_source, FFMS_ERROR_NO_FILE, |
| 52 | "Failed to open '" + this->filename + "'"); |
| 53 | } |
| 54 | |
| 55 | FileHandle::~FileHandle() { |
| 56 | avio_close(avio); |
nothing calls this directly
no test coverage detected