Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix file handle leaks in oggvorbis and wavpack tag readers. These, al…

…ong with one in the flac tag reader were caused when we stopped using an instance of the Taglib::FileRef class to read the track length. Taglib::FileRef would take ownership of the pointer and delete it when we were done, now that we're not using Taglib::FileRef we're again responsible for deleting the object which in turn closes the open file handle. Refs #10721

(cherry picked from commit f46b168)
  • Loading branch information...
commit 6ce0af8ce480b7445ebbd198a008f6023d17d24e 1 parent 2144ef1
@stuartm stuartm authored
View
4 mythplugins/mythmusic/mythmusic/metaiooggvorbis.cpp
@@ -136,8 +136,8 @@ Metadata* MetaIOOggVorbis::read(const QString &filename)
if (metadata->Length() <= 0)
metadata->setLength(getTrackLength(oggfile));
- else
- delete oggfile;
+
+ delete oggfile;
return metadata;
}
View
4 mythplugins/mythmusic/mythmusic/metaiowavpack.cpp
@@ -118,8 +118,8 @@ Metadata* MetaIOWavPack::read(const QString &filename)
if (metadata->Length() <= 0)
metadata->setLength(getTrackLength(wpfile));
- else
- delete wpfile;
+
+ delete wpfile;
return metadata;
}

0 comments on commit 6ce0af8

Please sign in to comment.
Something went wrong with that request. Please try again.