summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-18 13:11:06 -0500
committerDudemanguy <random342@airmail.cc>2023-10-19 12:10:53 -0500
commit3504136d3ff8728ae2ea841bc4309cc07138f113 (patch)
tree9261298a03ce6d1f3a4c9305fa5d4cf8c56148b3 /stream
parentd5e5c2ce9821db344c6744a33cec5068fe4bbeb3 (diff)
downloadmpv-3504136d3ff8728ae2ea841bc4309cc07138f113.tar.bz2
mpv-3504136d3ff8728ae2ea841bc4309cc07138f113.tar.xz
stream_cdda: remove printing track info in fill_buffer
It was completely wrong. mpv will buffer data ahead of where the CD currently is playing. When enough data was buffered into the next track, the track info is printed regardless of where the stream position actually is. Depending on the user settings, you can get mpv to buffer minutes ahead. Printing a message when the track changes might be nice, but this isn't the right place to do it. Some other mechanism would need to be leveraged, but I'm not going to bother figuring it out.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_cdda.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index f73c84a0da..c719c45363 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -134,7 +134,6 @@ static void cdparanoia_callback(long int inpos, paranoia_cb_mode_t function)
static int fill_buffer(stream_t *s, void *buffer, int max_len)
{
cdda_priv *p = (cdda_priv *)s->priv;
- int i;
if (!p->data || p->data_pos >= CDIO_CD_FRAMESIZE_RAW) {
if ((p->sector < p->start_sector) || (p->sector > p->end_sector))
@@ -151,14 +150,6 @@ static int fill_buffer(stream_t *s, void *buffer, int max_len)
size_t copy = MPMIN(CDIO_CD_FRAMESIZE_RAW - p->data_pos, max_len);
memcpy(buffer, p->data + p->data_pos, copy);
p->data_pos += copy;
-
- for (i = 0; i < p->cd->tracks; i++) {
- if (p->cd->disc_toc[i].dwStartSector == p->sector - 1) {
- print_track_info(s, i + 1);
- break;
- }
- }
-
return copy;
}