input_stream: size==-1 means unknown size
Define the special value "-1" as "unknown size". Previously, there was no indicator for streams with unknown size, which might confuse some decoders.
This commit is contained in:
@@ -92,6 +92,9 @@ static OggFLAC__SeekableStreamDecoderLengthStatus of_length_cb(mpd_unused const
|
||||
{
|
||||
FlacData *data = (FlacData *) fdata;
|
||||
|
||||
if (data->inStream->size < 0)
|
||||
return OggFLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
|
||||
|
||||
*length = (size_t) (data->inStream->size);
|
||||
|
||||
return OggFLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
|
||||
|
Reference in New Issue
Block a user