Fix a crash in copySubtitleSample.

This commit is contained in:
Damiano Galassi committed 2016-08-31 15:02:45 +02:00
1 parent b841840561
commit dbb759bbd8
4 files changed
+6 -15

No files matched your search

+2 -2
View File
@@ -58,7 +58,7 @@
dispatch_semaphore_signal(_empty);
}
- (nullable id)dequeue {
- (nullable id)dequeue NS_RETURNS_RETAINED {
if (!_count) return nil;
id item = _array[_head++];
@@ -73,7 +73,7 @@
return item;
}
- (nullable id)dequeueAndWait {
- (nullable id)dequeueAndWait NS_RETURNS_RETAINED {
id item = [self dequeue];
while (!item) {
+2 -2
View File
@@ -61,8 +61,8 @@ unsigned ParseSubTime(const char *time, unsigned secondScale, BOOL hasSign);
@class MP42SampleBuffer;
MP42SampleBuffer * copySubtitleSample(MP4TrackId subtitleTrackId, NSString *string, MP4Duration duration, BOOL forced, BOOL verticalPlacement, BOOL styles, CGSize trackSize, int top);
MP42SampleBuffer * copyEmptySubtitleSample(MP4TrackId subtitleTrackId, MP4Duration duration, BOOL forced);
MP42SampleBuffer * copySubtitleSample(MP4TrackId subtitleTrackId, NSString *string, MP4Duration duration, BOOL forced, BOOL verticalPlacement, BOOL styles, CGSize trackSize, int top) NS_RETURNS_RETAINED;
MP42SampleBuffer * copyEmptySubtitleSample(MP4TrackId subtitleTrackId, MP4Duration duration, BOOL forced) NS_RETURNS_RETAINED;
typedef struct {
// color format is 32-bit ARGB
-9
View File
@@ -257,15 +257,6 @@
return StringFromTime(_duration, 1000);
}
@synthesize sourceURL = _sourceURL;
@synthesize trackId = _trackId;
@synthesize sourceId = _sourceId;
@synthesize format = _format;
@synthesize sourceFormat = _sourceFormat;
@synthesize name = _name;
@synthesize extendedLanguageTag = _extendedLanguageTag;
- (NSString *)name {
if (_name == nil) {
_name = [[self defaultName] copy];
+2 -2
View File
@@ -1031,11 +1031,12 @@
A9B9C27A1823923200416A4E /* MP42Fifo.m in Sources */,
A9DFBDA3195FF5BA00410060 /* MP42Heap.m in Sources */,
A9B9C2801823923200416A4E /* MP42H264Importer.mm in Sources */,
A9B9C26B1823923200416A4E /* MP42AudioConverter.m in Sources */,
A9022A961D6F3FD9005F0920 /* MP42MetadataItem.m in Sources */,
A9B9C2D0182396A100416A4E /* MP42Ratings.m in Sources */,
A9B9C2AB1823923200416A4E /* mbs.cpp in Sources */,
A9B9C2AE1823923200416A4E /* sfifo.c in Sources */,
A9B9C26B1823923200416A4E /* MP42AudioConverter.m in Sources */,
A9B9C2711823923200416A4E /* MP42BitmapSubConverter.m in Sources */,
A9B9C28E1823923200416A4E /* MP42Muxer.m in Sources */,
A991714C195AAAEF005AD68E /* MP42Track+Muxer.m in Sources */,
A9B9C27C1823923200416A4E /* MP42File.m in Sources */,
@@ -1068,7 +1069,6 @@
A9B9C29A1823923200416A4E /* MP42SubUtilities.m in Sources */,
A90801131D4B83A3002B6950 /* MP42AudioDecoder.m in Sources */,
A9422FC51D4917AF000DB435 /* audio_resample.c in Sources */,
A9B9C2711823923200416A4E /* MP42BitmapSubConverter.m in Sources */,
A9B9C2A91823923200416A4E /* MatroskaParser.c in Sources */,
A9B9C2A71823923200416A4E /* MatroskaFile.c in Sources */,
);