Fix an issue that prevented the auto groups organizer from working with subtitles tracks.

This commit is contained in:
Damiano Galassi committed 2014-01-07 16:44:49 +01:00
1 parent 85eb58a521
commit 2218682e68
2 files changed
+5 -5

No files matched your search

+3 -2
View File
@@ -680,11 +680,12 @@ static void logCallback(MP4LogLevel loglevel, const char* fmt, va_list ap)
for (MP42Track *track in tracks) { for (MP42Track *track in tracks) {
track.alternate_group = groupID; track.alternate_group = groupID;
if (track.enabled && !enabled) if (track.enabled && !enabled) {
enabled = YES; enabled = YES;
else if (track.enabled) } else if (track.enabled) {
track.enabled = NO; track.enabled = NO;
} }
}
if (!enabled) if (!enabled)
[[tracks objectAtIndex:0] setEnabled:YES]; [[tracks objectAtIndex:0] setEnabled:YES];
+2 -3
View File
@@ -17,9 +17,10 @@
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP4FileHandle)fileHandle - (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP4FileHandle)fileHandle
{ {
if ((self = [super initWithSourceURL:URL trackID:trackID fileHandle:fileHandle])) { if ((self = [super initWithSourceURL:URL trackID:trackID fileHandle:fileHandle])) {
if (![_format isEqualToString:MP42SubtitleFormatVobSub]) {
_mediaType = MP42MediaTypeSubtitle; _mediaType = MP42MediaTypeSubtitle;
if (![_format isEqualToString:MP42SubtitleFormatVobSub]) {
MP4GetTrackIntegerProperty(fileHandle, _Id, "mdia.minf.stbl.stsd.tx3g.defTextBoxBottom", &height); MP4GetTrackIntegerProperty(fileHandle, _Id, "mdia.minf.stbl.stsd.tx3g.defTextBoxBottom", &height);
MP4GetTrackIntegerProperty(fileHandle, _Id, "mdia.minf.stbl.stsd.tx3g.defTextBoxRight", &width); MP4GetTrackIntegerProperty(fileHandle, _Id, "mdia.minf.stbl.stsd.tx3g.defTextBoxRight", &width);
@@ -84,8 +85,6 @@
} }
if (_isEdited && !_muxed) { if (_isEdited && !_muxed) {
_muxed = YES;
MP4GetTrackFloatProperty(fileHandle, _Id, "tkhd.width", &trackWidth); MP4GetTrackFloatProperty(fileHandle, _Id, "tkhd.width", &trackWidth);
MP4GetTrackFloatProperty(fileHandle, _Id, "tkhd.height", &trackHeight); MP4GetTrackFloatProperty(fileHandle, _Id, "tkhd.height", &trackHeight);