Add support for old SSA in mkv and mov.

This commit is contained in:
Damiano Galassi committed 2018-10-15 18:56:59 +02:00
1 parent 0e19dccbdf
commit 3f0c6c85b6
2 files changed
+11

No files matched your search

+10
View File
@@ -122,6 +122,14 @@
if ([track.mediaType isEqualToString:AVMediaTypeVideo]) { if ([track.mediaType isEqualToString:AVMediaTypeVideo]) {
FourCharCode code = 0;
if (formatDescription) {
code = CMFormatDescriptionGetMediaSubType(formatDescription);
}
if (code == 'SSA ') {
newTrack = [[MP42SubtitleTrack alloc] init];
} else {
// Video type, do the usual video things // Video type, do the usual video things
MP42VideoTrack *videoTrack = [[MP42VideoTrack alloc] init]; MP42VideoTrack *videoTrack = [[MP42VideoTrack alloc] init];
CGSize naturalSize = track.naturalSize; CGSize naturalSize = track.naturalSize;
@@ -246,7 +254,9 @@
} }
} }
} }
newTrack = videoTrack; newTrack = videoTrack;
}
} }
else if ([track.mediaType isEqualToString:AVMediaTypeAudio]) { else if ([track.mediaType isEqualToString:AVMediaTypeAudio]) {
+1
View File
@@ -574,6 +574,7 @@ static const struct {
{ "S_TEXT/WEBVTT", kMP42SubtitleCodecType_WebVTT }, { "S_TEXT/WEBVTT", kMP42SubtitleCodecType_WebVTT },
{ "S_TEXT/ASS", kMP42SubtitleCodecType_SSA }, { "S_TEXT/ASS", kMP42SubtitleCodecType_SSA },
{ "S_TEXT/SSA", kMP42SubtitleCodecType_SSA }, { "S_TEXT/SSA", kMP42SubtitleCodecType_SSA },
{ "S_SSA", kMP42SubtitleCodecType_SSA },
{ "S_VOBSUB", kMP42SubtitleCodecType_VobSub }, { "S_VOBSUB", kMP42SubtitleCodecType_VobSub },
{ "S_HDMV/PGS", kMP42SubtitleCodecType_PGS }, { "S_HDMV/PGS", kMP42SubtitleCodecType_PGS },