Browse Source

VLCMedia: fix KVC violations introduced in 5f600938

Felix Paul Kühne 11 years ago
parent
commit
18f5e18a87
1 changed files with 13 additions and 8 deletions
  1. 13 8
      Sources/VLCMedia.m

+ 13 - 8
Sources/VLCMedia.m

@@ -58,18 +58,18 @@ NSString *const VLCMediaMetaChanged              = @"VLCMediaMetaChanged";
 /******************************************************************************
  * VLCMedia ()
  */
-@interface VLCMedia ()
+@interface VLCMedia()
 {
-    void *                p_md;              //< Internal media descriptor instance
-    BOOL                  isArtFetched;      //< Value used to determine of the artwork has been parsed
-    BOOL                  areOthersMetaFetched; //< Value used to determine of the other meta has been parsed
-    BOOL                  isArtURLFetched;   //< Value used to determine of the other meta has been preparsed
-    BOOL                  isParsed;
+    void *                  p_md;              //< Internal media descriptor instance
+    BOOL                    isArtFetched;      //< Value used to determine of the artwork has been parsed
+    BOOL                    areOthersMetaFetched; //< Value used to determine of the other meta has been parsed
+    BOOL                    isArtURLFetched;   //< Value used to determine of the other meta has been preparsed
+    BOOL                    isParsed;
+    NSMutableDictionary     *_metaDictionary;
 }
 
 /* Make our properties internally readwrite */
 @property (nonatomic, readwrite) VLCMediaState state;
-@property (nonatomic, readwrite, copy) NSDictionary *metaDictionary;
 @property (nonatomic, readwrite, strong) VLCMediaList * subitems;
 
 /* Statics */
@@ -885,6 +885,11 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
 
 #else
 
+- (NSDictionary *)metaDictionary
+{
+    return [NSDictionary dictionaryWithDictionary:_metaDictionary];
+}
+
 - (id)valueForKeyPath:(NSString *)keyPath
 {
     if (!isArtFetched && [keyPath isEqualToString:@"metaDictionary.artwork"]) {
@@ -937,7 +942,7 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
         libvlc_media_retain(md);
         p_md = md;
 
-        self.metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];
+        _metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];
 
         [self initInternalMediaDescriptor];
     }