Mercurial > audlegacy-plugins
diff src/flacng/seekable_stream_callbacks.c @ 1259:690659633ec5
- Fix endless looping on certain unparseable streams
| author | Ralf Ertzinger <ralf@skytale.net> |
|---|---|
| date | Fri, 13 Jul 2007 16:34:54 +0200 |
| parents | 626f78ff2439 |
| children | 47559538ce3d |
line wrap: on
line diff
--- a/src/flacng/seekable_stream_callbacks.c Fri Jul 13 14:36:28 2007 +0200 +++ b/src/flacng/seekable_stream_callbacks.c Fri Jul 13 16:34:54 2007 +0200 @@ -138,6 +138,16 @@ info = (callback_info*) client_data; _DEBUG("Using callback_info %s", info->name); + /* + * If we are testing a stream and use restricted reading, + * return EOF if we have exhausted our alotted reading + * quota + */ + if (0 == info->read_max) { + _DEBUG("read_max exhausted, faking EOF"); + return TRUE; + } + eof = vfs_feof(info->input_stream); _LEAVE eof;
