summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-30 08:58:56 -0500
committerDudemanguy <random342@airmail.cc>2023-09-30 09:02:57 -0500
commit3a572c7a88329666a803bb8eb4de0a5a19e60cf8 (patch)
tree48b8f9f4d218149a67c12f838a8f0989799e338f /sub/dec_sub.c
parent84fa7ea411e8e99fced66295c973ecdf94ee07b2 (diff)
downloadmpv-3a572c7a88329666a803bb8eb4de0a5a19e60cf8.tar.bz2
mpv-3a572c7a88329666a803bb8eb4de0a5a19e60cf8.tar.xz
Revert "demux: improve stream selection state"
The stream selection state wasn't improved. I didn't realize this messed with caches. All in all, just not a good idea. Back to drawing board I guess. This reverts commit f40bbfec4fcd2d9a787a4d98ec7698a646e5607e.
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r--sub/dec_sub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index 84c6b7bfbe..dc26aa027e 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -269,7 +269,7 @@ static bool is_new_segment(struct dec_sub *sub, struct demux_packet *p)
// Read packets from the demuxer stream passed to sub_create(). Return true if
// enough packets were read, false if the player should wait until the demuxer
// signals new packets available (and then should retry).
-bool sub_read_packets(struct dec_sub *sub, double video_pts)
+bool sub_read_packets(struct dec_sub *sub, double video_pts, bool force)
{
bool r = true;
pthread_mutex_lock(&sub->lock);
@@ -291,7 +291,7 @@ bool sub_read_packets(struct dec_sub *sub, double video_pts)
break;
// (Use this mechanism only if sub_delay matters to avoid corner cases.)
- double min_pts = sub->opts->sub_delay < 0 ? video_pts : MP_NOPTS_VALUE;
+ double min_pts = sub->opts->sub_delay < 0 || force ? video_pts : MP_NOPTS_VALUE;
struct demux_packet *pkt;
int st = demux_read_packet_async_until(sub->sh, min_pts, &pkt);