diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-02-10 18:25:09 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-02-10 18:25:09 +0000 |
commit | 1c19b8e8e3cfb32e341332b751686e86d7389569 (patch) | |
tree | 64d9edcf312915b3d9ae524d55b6508b61bf361f /src/input/input_stdin_fifo.c | |
parent | c62b455944c8c91bd4d9ae5e8000ec33190174c5 (diff) | |
parent | 6002a9a87b3f591832c2b91ca1b2b1b67be008f5 (diff) | |
download | xine-lib-1c19b8e8e3cfb32e341332b751686e86d7389569.tar.gz xine-lib-1c19b8e8e3cfb32e341332b751686e86d7389569.tar.bz2 |
Merge from 1.1.
--HG--
rename : doc/faq/faq.sgml => doc/faq/faq.docbook
rename : src/xine-engine/buffer.h => include/xine/buffer.h
rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h
Diffstat (limited to 'src/input/input_stdin_fifo.c')
-rw-r--r-- | src/input/input_stdin_fifo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 2797568b6..55ac18a42 100644 --- a/src/input/input_stdin_fifo.c +++ b/src/input/input_stdin_fifo.c @@ -124,7 +124,9 @@ static buf_element_t *stdin_plugin_read_block (input_plugin_t *this_gen, fifo_bu /* stdin_input_plugin_t *this = (stdin_input_plugin_t *) this_gen; */ buf_element_t *buf = fifo->buffer_pool_alloc (fifo); - if (todo < 0 || todo > buf->size) { + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { buf->free_buffer (buf); return NULL; } |