Fix hanging/overlapping dvb subtitles (#2792).
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 7f7a078638b540ba81bbbe38c5ad260970232fa0..6130d8e5fb5c59be98c6aec9c6ed7b78e23eeac1 100644 (file)
@@ -668,11 +668,11 @@ FFmpegDecoder::decode_and_process_subtitle_packet (AVPacket* packet)
        */
        ContentTime from;
        from = sub_period.from + _pts_offset;
+       _have_current_subtitle = true;
        if (sub_period.to) {
                _current_subtitle_to = *sub_period.to + _pts_offset;
        } else {
                _current_subtitle_to = optional<ContentTime>();
-               _have_current_subtitle = true;
        }
 
        ContentBitmapText bitmap_text(from);