diff options
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 09d1e2786..f57c9efe8 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -243,6 +243,11 @@ FFmpegDecoder::pass () 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; } @@ -697,10 +702,6 @@ FFmpegDecoder::decode_and_process_subtitle_packet (AVPacket* packet) only_text()->emit_bitmap_start(bitmap_text); } - if (_current_subtitle_to) { - only_text()->emit_stop (*_current_subtitle_to); - } - avsubtitle_free (&sub); } |
