diff options
Diffstat (limited to 'stream/stream_cdda.c')
-rw-r--r-- | stream/stream_cdda.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index a75ee3ae40..13ec14644b 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -266,6 +266,10 @@ static int control(stream_t *stream, int cmd, void *arg) *(double *)arg = pos / (44100.0 * 2 * 2); return STREAM_OK; } + case STREAM_CTRL_GET_SIZE: + *(int64_t *)arg = + (p->end_sector + 1 - p->start_sector) * CDIO_CD_FRAMESIZE_RAW; + return STREAM_OK; } return STREAM_UNSUPPORTED; } @@ -373,8 +377,6 @@ static int open_cdda(stream_t *st) priv->sector = priv->start_sector; st->priv = priv; - st->end_pos = - (priv->end_sector + 1 - priv->start_sector) * CDIO_CD_FRAMESIZE_RAW; st->sector_size = CDIO_CD_FRAMESIZE_RAW; st->fill_buffer = fill_buffer; |