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/mmsh.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/input/mmsh.c') diff --git a/src/input/mmsh.c b/src/input/mmsh.c index 1f909fd5c..db3a256c2 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.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: mmsh.c,v 1.9 2003/01/25 15:00:10 tmattern Exp $ + * $Id: mmsh.c,v 1.10 2003/01/31 14:06:17 miguelfreitas Exp $ * * based on mms.c and specs from avifile * (http://avifile.sourceforge.net/asf-1.0.htm) @@ -1022,10 +1022,14 @@ static int get_media_packet (mmsh_t *this) { } } -int mmsh_peek_header (mmsh_t *this, char *data) { +int mmsh_peek_header (mmsh_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 mmsh_read (mmsh_t *this, char *data, int len) { -- cgit v1.2.3