Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 442d83cf authored by You Kim's avatar You Kim
Browse files

FileSource: FILE is not closed

Add destructor to call fclose.

Change-Id: I765c56236f8df58af998439492b0b955ab57606f
parent 03425d9c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -132,6 +132,10 @@ struct FileSource : public FragmentedMP4Parser::Source {
            CHECK(mFile != NULL);
        }

    virtual ~FileSource() {
        fclose(mFile);
    }

    virtual ssize_t readAt(off64_t offset, void *data, size_t size) {
        fseek(mFile, offset, SEEK_SET);
        return fread(data, 1, size, mFile);