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