Ticket #10766: patch.fixavfdecoder

File patch.fixavfdecoder, 744 bytes (added by mayfields@…, 12 years ago)

Fix to avfdecoder.cpp

Line 
1--- a/mythtv/mythplugins/mythmusic/mythmusic/avfdecoder.cpp     2012-04-24 17:33:38.000000000 +0930
2+++ b/mythtv/mythplugins/mythmusic/mythmusic/avfdecoder.cpp     2012-05-30 12:27:55.550473950 +0930
3@@ -508,10 +508,14 @@ MetaIO* avfDecoder::doCreateTagger(void)
4     else if (extension == "flac")
5     {
6         MetaIOID3 *file = new MetaIOID3();
7-        if (file->TagExists(filename))
8-            return file;
9-        else
10-            return new MetaIOFLACVorbis(); 
11+        if (file)
12+        {
13+            if (file->TagExists(filename))
14+                return file;
15+            else
16+                delete file;
17+        }
18+        return new MetaIOFLACVorbis();
19     }
20     else if (extension == "m4a")
21         return new MetaIOMP4();