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 | |
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')
-rw-r--r-- | src/input/input_dvb.c | 4 | ||||
-rw-r--r-- | src/input/input_file.c | 4 | ||||
-rw-r--r-- | src/input/input_gnome_vfs.c | 4 | ||||
-rw-r--r-- | src/input/input_http.c | 4 | ||||
-rw-r--r-- | src/input/input_mms.c | 4 | ||||
-rw-r--r-- | src/input/input_net.c | 4 | ||||
-rw-r--r-- | src/input/input_pnm.c | 4 | ||||
-rw-r--r-- | src/input/input_pvr.c | 4 | ||||
-rw-r--r-- | src/input/input_rtp.c | 4 | ||||
-rw-r--r-- | src/input/input_rtsp.c | 4 | ||||
-rw-r--r-- | src/input/input_smb.c | 4 | ||||
-rw-r--r-- | src/input/input_stdin_fifo.c | 4 |
12 files changed, 36 insertions, 12 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 2c25b9863..065a57b47 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -2590,7 +2590,9 @@ static buf_element_t *dvb_plugin_read_block (input_plugin_t *this_gen, buf_element_t *buf = fifo->buffer_pool_alloc (fifo); int total_bytes; - if (todo < 0 || todo > buf->size) { + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { buf->free_buffer (buf); return NULL; } diff --git a/src/input/input_file.c b/src/input/input_file.c index 387b8c4ea..26874db7c 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -169,7 +169,9 @@ static buf_element_t *file_plugin_read_block (input_plugin_t *this_gen, fifo_buf file_input_plugin_t *this = (file_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; } diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index cb0c88877..acb63dcf6 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -122,7 +122,9 @@ gnomevfs_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t total_bytes; 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; } diff --git a/src/input/input_http.c b/src/input/input_http.c index 3b87e003d..a4a37c501 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -474,7 +474,9 @@ static buf_element_t *http_plugin_read_block (input_plugin_t *this_gen, fifo_buf off_t total_bytes; 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; } diff --git a/src/input/input_mms.c b/src/input/input_mms.c index 3d06653ea..191d1aed0 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -123,7 +123,9 @@ static buf_element_t *mms_plugin_read_block (input_plugin_t *this_gen, lprintf ("mms_plugin_read_block: %"PRId64" bytes...\n", todo); - if (todo < 0 || todo > buf->size) { + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { buf->free_buffer (buf); return NULL; } diff --git a/src/input/input_net.c b/src/input/input_net.c index 964995bf6..a052d5650 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -292,7 +292,9 @@ static buf_element_t *net_plugin_read_block (input_plugin_t *this_gen, buf_element_t *buf = fifo->buffer_pool_alloc (fifo); off_t total_bytes; - if (todo < 0 || todo > buf->size) { + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { buf->free_buffer (buf); return NULL; } diff --git a/src/input/input_pnm.c b/src/input/input_pnm.c index afb64e3f5..718473819 100644 --- a/src/input/input_pnm.c +++ b/src/input/input_pnm.c @@ -98,7 +98,9 @@ static buf_element_t *pnm_plugin_read_block (input_plugin_t *this_gen, lprintf ("pnm_plugin_read_block: %"PRId64" bytes...\n", todo); - if (todo < 0 || todo > buf->size) { + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { buf->free_buffer (buf); return NULL; } diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index feacc0edf..07f5d955d 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -1209,7 +1209,9 @@ static buf_element_t *pvr_plugin_read_block (input_plugin_t *this_gen, fifo_buff } 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; } diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index 4d1fb43a9..d8822a3e1 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -528,7 +528,9 @@ static buf_element_t *rtp_plugin_read_block (input_plugin_t *this_gen, buf_element_t *buf = fifo->buffer_pool_alloc (fifo); int total_bytes; - if (todo < 0 || todo > buf->size) { + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { buf->free_buffer (buf); return NULL; } diff --git a/src/input/input_rtsp.c b/src/input/input_rtsp.c index 0522f555b..0e5af6043 100644 --- a/src/input/input_rtsp.c +++ b/src/input/input_rtsp.c @@ -98,7 +98,9 @@ static buf_element_t *rtsp_plugin_read_block (input_plugin_t *this_gen, lprintf ("rtsp_plugin_read_block: %"PRId64" bytes...\n", todo); - if (todo < 0 || todo > buf->size) { + if (todo > buf->max_size) + todo = buf->max_size; + if (todo < 0) { buf->free_buffer (buf); return NULL; } diff --git a/src/input/input_smb.c b/src/input/input_smb.c index b7c864f50..3c2086cc3 100644 --- a/src/input/input_smb.c +++ b/src/input/input_smb.c @@ -92,7 +92,9 @@ smb_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t total_bytes; 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; } 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; } |