1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 14:52:43 +00:00

sd_ass: enable sub-start and sub-end with unknown duration subs

The function called to get sub-start and sub-end returns early when the
subtitle's duration is unknown, but by just removing this check the
properties work fine. The final sub line has a very large sub-end, but
that is much better than not having the properties work at all.
This commit is contained in:
Guido Cella 2023-10-05 21:05:08 +02:00 committed by sfan5
parent 07995f5d5f
commit 185fa9ffc6

View File

@ -748,7 +748,7 @@ static struct sd_times get_times(struct sd *sd, double pts)
ASS_Track *track = ctx->ass_track; ASS_Track *track = ctx->ass_track;
struct sd_times res = { .start = MP_NOPTS_VALUE, .end = MP_NOPTS_VALUE }; struct sd_times res = { .start = MP_NOPTS_VALUE, .end = MP_NOPTS_VALUE };
if (pts == MP_NOPTS_VALUE || ctx->duration_unknown) if (pts == MP_NOPTS_VALUE)
return res; return res;
long long ipts = find_timestamp(sd, pts); long long ipts = find_timestamp(sd, pts);