From b47bf06f9734c6a7c0a6b95721a9e3200d0f6bbb Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Dec 2015 01:35:52 +0100 Subject: sub: change how subtitles are read Slightly change how it is decided when a new packet should be read. Switch to demux_read_packet_async(), and let the player "wait properly" until required subtitle packets arrive, instead of blocking everything. Move distinguishing the cases of passive and active reading into the demuxer, where it belongs. --- player/playloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 892baf1a09..c81f720122 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -1036,7 +1036,8 @@ void run_playloop(struct MPContext *mpctx) handle_dummy_ticks(mpctx); update_osd_msg(mpctx); - update_subtitles(mpctx); + if (!mpctx->video_out) + update_subtitles(mpctx, mpctx->playback_pts); handle_segment_switch(mpctx, end_is_new_segment); -- cgit v1.2.3