Override the value for file size in bytes. Useful for getting sensible track length values in feed mode or for HTTP streams.

https://www.mpg123.de/api/group__mpg123__status.shtml#gad0301e80dbc3f48e47e27d39cd328755
This commit is contained in:
boedy 2024-08-08 18:42:41 +02:00
parent bbbbf5f4bd
commit 731f20111a
1 changed files with 4 additions and 0 deletions

View File

@ -353,6 +353,10 @@ mpd_mpg123_stream_decode(DecoderClient &client, InputStream &is)
}; };
mpd_mpg123_open_stream(*handle, iohandle); mpd_mpg123_open_stream(*handle, iohandle);
if (is.KnownSize())
mpg123_set_filesize(handle, is.GetSize());
Decode(client, *handle, is.IsSeekable()); Decode(client, *handle, is.IsSeekable());
} }