diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-10-06 15:59:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-10-06 15:59:52 +0100 |
| commit | 2e65c35b14a2be868841f9669daf7f18acdffc7d (patch) | |
| tree | 4e5f2431199a31e93ff1a8ef7a11b260c3efb1eb /src | |
| parent | 5847dc546f88f947835992b197b022c92c773cc5 (diff) | |
Tidy up and correctness fix.
Diffstat (limited to 'src')
| -rw-r--r-- | src/subtitle_asset.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index ed3085fe..0fff7b08 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -482,14 +482,15 @@ SubtitleAsset::subtitles_as_xml (xmlpp::Element* xml_root, int time_code_rate, S last_out = i.out (); last_fade_up_time = i.fade_up_time (); last_fade_down_time = i.fade_down_time (); + text.reset (); } if (!text || - (last_h_align != i.h_align() || - fabs(last_h_position - i.h_position()) > ALIGN_EPSILON || - last_v_align != i.v_align() || - fabs(last_v_position - i.v_position()) > ALIGN_EPSILON || - last_direction != i.direction()) + last_h_align != i.h_align() || + fabs(last_h_position - i.h_position()) > ALIGN_EPSILON || + last_v_align != i.v_align() || + fabs(last_v_position - i.v_position()) > ALIGN_EPSILON || + last_direction != i.direction() ) { text.reset (new order::Text (subtitle, i.h_align(), i.h_position(), i.v_align(), i.v_position(), i.direction())); |
