This was re-introduced when
94618a724124cbf5fe9f0b47a3fdce601fcd5581
reverted a previous attempt at a fix.
At the time I couldn't understand the doubled-subtitles problem,
but it's apparent in the test introduced in the next commit.
This is another attempt to fix it by only sending a "stop" for
a subtitle if we didn't already stop the subtitle because the
next one arrived.
decode_and_process_audio_packet (packet);
}
+ if (_have_current_subtitle && _current_subtitle_to && position() > *_current_subtitle_to) {
+ only_text()->emit_stop(*_current_subtitle_to);
+ _have_current_subtitle = false;
+ }
+
av_packet_free (&packet);
return false;
}
only_text()->emit_bitmap_start(bitmap_text);
}
- if (_current_subtitle_to) {
- only_text()->emit_stop (*_current_subtitle_to);
- }
-
avsubtitle_free (&sub);
}