diff options
Diffstat (limited to 'macosx/HBPreviewGenerator.m')
-rw-r--r-- | macosx/HBPreviewGenerator.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/macosx/HBPreviewGenerator.m b/macosx/HBPreviewGenerator.m index 99ca20f86..25a7ec344 100644 --- a/macosx/HBPreviewGenerator.m +++ b/macosx/HBPreviewGenerator.m @@ -52,7 +52,7 @@ typedef enum EncodeState : NSUInteger { * * @param index picture index in title. */ -- (NSImage *) imageAtIndex: (NSUInteger) index +- (NSImage *) imageAtIndex: (NSUInteger) index shouldCache: (BOOL) cache { if (index >= self.imagesCount) return nil; @@ -67,7 +67,8 @@ typedef enum EncodeState : NSUInteger { libhb:self.handle title:self.title deinterlace:self.deinterlace]; - [self.picturePreviews setObject:theImage forKey:@(index)]; + if (cache) + [self.picturePreviews setObject:theImage forKey:@(index)]; } return theImage; |