summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-18 14:19:17 -0500
committerDudemanguy <random342@airmail.cc>2023-10-19 12:10:53 -0500
commit39247bd0b68042d7ed3636085f071b8c7326c531 (patch)
treed3001c6749f96592115db7e2e3ff0adb96212727 /stream
parent3504136d3ff8728ae2ea841bc4309cc07138f113 (diff)
downloadmpv-39247bd0b68042d7ed3636085f071b8c7326c531.tar.bz2
mpv-39247bd0b68042d7ed3636085f071b8c7326c531.tar.xz
stream_cdda: deprecate --cdda-toc-bias and always check for offsets
I started going through the blame but once I got to mplayer commits from 20 years ago, I stopped bothering. This obscure option has always been disabled by default, but there's zero reason, as far as I know, to not just enable it today. Some CDs (particularly very old ones) have the first sector shifted a bit and not starting exactly at 0. This makes the logic that tries to get all the chapters completely fail and thus you can't skip through tracks. However if you just enable this obscure option, it just works. For anything that starts exactly at 0, the calculated offset is just 0 anyway so it's a no-op and works exactly the same. So basically, there's literally no reason to not just always try to correct for the offset of the first sector by default. Fixes #8777.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_cdda.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index c719c45363..71ae461493 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -74,7 +74,8 @@ const struct m_sub_options stream_cdda_conf = {
{"paranoia", OPT_INT(paranoia_mode), M_RANGE(0, 2)},
{"sector-size", OPT_INT(sector_size), M_RANGE(1, 100)},
{"overlap", OPT_INT(search_overlap), M_RANGE(0, 75)},
- {"toc-bias", OPT_INT(toc_bias)},
+ {"toc-bias", OPT_INT(toc_bias),
+ .deprecation_message = "toc-bias is no longer used"},
{"toc-offset", OPT_INT(toc_offset)},
{"skip", OPT_BOOL(skip)},
{"span-a", OPT_INT(span[0])},
@@ -284,9 +285,7 @@ static int open_cdda(stream_t *st)
priv->cd = cdd;
- if (p->toc_bias)
- offset -= cdda_track_firstsector(cdd, 1);
-
+ offset -= cdda_track_firstsector(cdd, 1);
if (offset) {
for (int n = 0; n < cdd->tracks + 1; n++)
cdd->disc_toc[n].dwStartSector += offset;