From 8695f5d8c99952a89f59b314c58a5e0bbd8a6e6e Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 31 Jan 2003 14:06:03 +0000 Subject: - MAX_PREVIEW_SIZE = 4096 - new fb driver with zero copy CVS patchset: 4058 CVS date: 2003/01/31 14:06:03 --- src/input/mms.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/input/mms.c') diff --git a/src/input/mms.c b/src/input/mms.c index 8afb68ac0..6b5545577 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.19 2003/01/25 15:00:07 tmattern Exp $ + * $Id: mms.c,v 1.20 2003/01/31 14:06:17 miguelfreitas Exp $ * * based on work from major mms * utility functions to handle communication with an mms server @@ -1133,10 +1133,14 @@ static int get_media_packet (mms_t *this) { return 1; } -int mms_peek_header (mms_t *this, char *data) { +int mms_peek_header (mms_t *this, char *data, int maxsize) { - memcpy (data, this->asf_header, this->asf_header_len); - return this->asf_header_len; + int len; + + len = (this->asf_header_len < maxsize) ? this->asf_header_len : maxsize; + + memcpy(data, this->asf_header, len); + return len; } int mms_read (mms_t *this, char *data, int len) { -- cgit v1.2.3