summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-29 01:35:52 +0100
committerwm4 <wm4@nowhere>2015-12-29 01:35:52 +0100
commitb47bf06f9734c6a7c0a6b95721a9e3200d0f6bbb (patch)
tree7e60cf54f359ac5bc70babb26e2dcd98e056fe78 /sub/dec_sub.h
parent9b3daa49745dfdc8e53940a2a449f7107940e8c4 (diff)
downloadmpv-b47bf06f9734c6a7c0a6b95721a9e3200d0f6bbb.tar.bz2
mpv-b47bf06f9734c6a7c0a6b95721a9e3200d0f6bbb.tar.xz
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.
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r--sub/dec_sub.h3
1 files changed, 1 insertions, 2 deletions
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);