Add a simple pre-processing to vobsub samples and disable styles creation for vobsub.

This commit is contained in:
Damiano Galassi committed 2014-02-09 14:58:57 +01:00
1 parent 6b73413c7c
commit 2e559043eb
6 files changed
+194 -153

No files matched your search

+4 -2
View File
@@ -997,14 +997,16 @@ void createTboxAtom(u_int8_t* buffer, u_int16_t top, u_int16_t left, u_int16_t b
buffer[15] = right & 0xFF;
}
MP42SampleBuffer* copySubtitleSample(MP4TrackId subtitleTrackId, NSString *string, MP4Duration duration, BOOL forced, BOOL verticalPlacement, CGSize trackSize, int top)
MP42SampleBuffer * copySubtitleSample(MP4TrackId subtitleTrackId, NSString *string, MP4Duration duration, BOOL forced, BOOL verticalPlacement, BOOL styles, CGSize trackSize, int top)
{
u_int8_t *sampleData = NULL, *styleAtom = NULL;
size_t styleSize = 0, sampleSize = 0, stringLength = 0;
u_int64_t pos = 0;
string = removeNewLines(string);
string = createStyleAtomForString(string, &styleAtom, &styleSize);
if (styles) {
string = createStyleAtomForString(string, &styleAtom, &styleSize);
}
stringLength = strlen([string UTF8String]);
sampleSize = 2 + (stringLength * sizeof(char)) + styleSize + (forced == 1 ? 8 : 0) + (verticalPlacement == 1 ? 16 : 0);