diff options
author | Max Kellermann <max@duempel.org> | 2008-11-16 20:42:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-16 20:42:08 +0100 |
commit | 7591403566971eb19ba7bb16002eaa2689a637c7 (patch) | |
tree | cc08c5542d7e52b3bb3457b1e62fd209ba125be5 /src/decoder/oggflac_plugin.c | |
parent | 8882f062000ec6f86d932eee7c948d1369901c03 (diff) | |
download | mpd-7591403566971eb19ba7bb16002eaa2689a637c7.tar.gz mpd-7591403566971eb19ba7bb16002eaa2689a637c7.tar.xz mpd-7591403566971eb19ba7bb16002eaa2689a637c7.zip |
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.
Diffstat (limited to 'src/decoder/oggflac_plugin.c')
-rw-r--r-- | src/decoder/oggflac_plugin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/oggflac_plugin.c b/src/decoder/oggflac_plugin.c index b9ef13722..7550005d9 100644 --- a/src/decoder/oggflac_plugin.c +++ b/src/decoder/oggflac_plugin.c @@ -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; |