stream_cdda: cast to int64_t before multiplication

Just to silence static analysis warning. It is assigned to int64_t
anyway.
This commit is contained in:
Kacper Michajłow committed 2025-03-06 21:58:38 +01:00
1 parent f7c2af2acd
commit dd107a1a39
1 file changed
+2 -2
+2 -2
View File
@@ -160,7 +160,7 @@ static int seek(stream_t *s, int64_t newpos)
int seek_to_track = 0;
int i;
newpos += p->start_sector * CDIO_CD_FRAMESIZE_RAW;
newpos += (int64_t)p->start_sector * CDIO_CD_FRAMESIZE_RAW;
sec = newpos / CDIO_CD_FRAMESIZE_RAW;
if (newpos < 0 || sec > p->end_sector) {
@@ -240,7 +240,7 @@ static int control(stream_t *stream, int cmd, void *arg)
static int64_t get_size(stream_t *st)
{
cdda_priv *p = st->priv;
return (p->end_sector + 1 - p->start_sector) * CDIO_CD_FRAMESIZE_RAW;
return (int64_t)(p->end_sector + 1 - p->start_sector) * CDIO_CD_FRAMESIZE_RAW;
}
static int open_cdda(stream_t *st)