diff options
author | rcombs <rcombs@rcombs.me> | 2021-05-27 00:56:41 -0500 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-06-25 11:01:58 +0200 |
commit | ba7cc071068f4f57ae354e77f64552712fda6855 (patch) | |
tree | eb264b91c1465e149d8d3aefdad7a9813d658b13 /sub/sd_lavc.c | |
parent | 991a2f79ce381544437791430c91cd026e21d726 (diff) | |
download | mpv-ba7cc071068f4f57ae354e77f64552712fda6855.tar.bz2 mpv-ba7cc071068f4f57ae354e77f64552712fda6855.tar.xz |
sub: rewrite auto-forced-only support
- No longer has a fake "option" used only internally (which didn't always get propagated properly)
- Always overrideable during playback
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r-- | sub/sd_lavc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 1f7bf76fce..50d3f2bceb 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -195,7 +195,8 @@ static void read_sub_bitmaps(struct sd *sd, struct sub *sub) MP_ERR(sd, "unsupported subtitle type from libavcodec\n"); continue; } - if (!(r->flags & AV_SUBTITLE_FLAG_FORCED) && opts->forced_subs_only_current) + if (!(r->flags & AV_SUBTITLE_FLAG_FORCED) && (opts->forced_subs_only == 1 || + (opts->forced_subs_only && sd->forced_only_def))) continue; if (r->w <= 0 || r->h <= 0) continue; |