commit 6141cdf88e129ae0b1ba0fe0c96644cacc54e41c
parent adec71a99fd28652c17bc1f497e91e8ad76ddf84
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 30 Jul 2012 22:05:58 +0000
-fixes
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/extractor.c b/src/main/extractor.c
@@ -313,7 +313,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
if not, send 'seek' notification to plugins in range */
for (pos = plugins; NULL != pos; pos = pos->next)
{
- if (NULL == (channel = channels[plugin_count]))
+ if (NULL == (channel = pos->channel))
continue;
if ( (-1 != pos->seek_request) &&
(min_seek <= pos->seek_request) &&
diff --git a/src/main/extractor_datasource.c b/src/main/extractor_datasource.c
@@ -426,7 +426,8 @@ bfds_read (struct BufferedFileDataSource *bfds,
avail = bfds->buffer_bytes - bfds->buffer_pos;
if (avail > count)
avail = count;
- ASSERT (0 != avail);
+ if (0 == avail)
+ break;
memcpy (&cbuf[ret], bfds->data + bfds->buffer_pos, avail);
bfds->buffer_pos += avail;
count -= avail;
@@ -1137,6 +1138,7 @@ EXTRACTOR_datasource_create_from_buffer_ (const char *buf,
}
ds->bfds = bfds;
ds->fd = -1;
+ ds->cfs = NULL;
ct = get_compression_type (bfds);
if ( (COMP_TYPE_ZLIB == ct) ||
(COMP_TYPE_BZ2 == ct) )