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. --- sub/dec_sub.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sub/dec_sub.h') diff --git a/sub/dec_sub.h b/sub/dec_sub.h index 56db5bc519..b3f30520e3 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -29,8 +29,7 @@ void sub_lock(struct dec_sub *sub); void sub_unlock(struct dec_sub *sub); bool sub_read_all_packets(struct dec_sub *sub); -bool sub_accepts_packet_in_advance(struct dec_sub *sub); -void sub_decode(struct dec_sub *sub, struct demux_packet *packet); +bool sub_read_packets(struct dec_sub *sub, double video_pts); void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, double pts, struct sub_bitmaps *res); char *sub_get_text(struct dec_sub *sub, double pts); -- cgit v1.2.3