Commit 9a2e1ecd8caade9d2bf9c83ec2e883f725763c2a
1 parent
9884fa1f
Exists in
master
and in
1 other branch
Seta timeIn=0 para linhas vazias de legenda
Showing
2 changed files
with
6 additions
and
0 deletions
Show diff stats
extrator/src/extratorSRT.cpp
@@ -136,6 +136,9 @@ Subtitle* ExtratorSRT::next() { | @@ -136,6 +136,9 @@ Subtitle* ExtratorSRT::next() { | ||
136 | seek_pos += (int64_t) text_sub.size() + SIZE_CSCAPE; | 136 | seek_pos += (int64_t) text_sub.size() + SIZE_CSCAPE; |
137 | 137 | ||
138 | } catch (lavidlib::EOFException &ex) { | 138 | } catch (lavidlib::EOFException &ex) { |
139 | + if(text_sub == "") | ||
140 | + sub->setTimeIn(0); //seta o valor 0 para nao gerar um valor aleatório | ||
141 | + | ||
139 | sub->setSubtitleText(formatText(text_sub)); | 142 | sub->setSubtitleText(formatText(text_sub)); |
140 | seek_pos += (int64_t) text_sub.size() + SIZE_CSCAPE; | 143 | seek_pos += (int64_t) text_sub.size() + SIZE_CSCAPE; |
141 | hasNextSub = false; | 144 | hasNextSub = false; |
extrator/src/extratorVTT.cpp
@@ -98,6 +98,9 @@ Subtitle* ExtratorVTT::nextCue() { | @@ -98,6 +98,9 @@ Subtitle* ExtratorVTT::nextCue() { | ||
98 | } | 98 | } |
99 | 99 | ||
100 | }catch(lavidlib::EOFException &ex){ | 100 | }catch(lavidlib::EOFException &ex){ |
101 | + if(cueText == "") | ||
102 | + cue->setTimeIn(0); //seta o valor 0 para nao gerar um valor aleatório | ||
103 | + | ||
101 | cue->setSubtitleText(formatText(cueText)); | 104 | cue->setSubtitleText(formatText(cueText)); |
102 | seekPos += (int64_t) cueText.size() + SIZE_SCAPE; | 105 | seekPos += (int64_t) cueText.size() + SIZE_SCAPE; |
103 | hasNextCue =false; | 106 | hasNextCue =false; |