Commit b0ef1133 authored by Christophe Massiot's avatar Christophe Massiot

Fixed many alignment issues.

parent 8ed3168e
This diff is collapsed.
......@@ -33,10 +33,8 @@ AC_PROG_RANLIB
dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL
dnl Check for endianness if not cross-compiling
if test x${cross_compiling} != xyes; then
AC_C_BIGENDIAN
fi
dnl Check for endianness
AC_C_BIGENDIAN
dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
......
......@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-dec.h,v 1.34 2001/08/22 17:21:45 massiot Exp $
* $Id: input_ext-dec.h,v 1.35 2001/09/24 11:17:49 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
......@@ -255,7 +255,18 @@ static __inline__ u32 ShowBits( bit_stream_t * p_bit_stream,
}
UnalignedShowBits( p_bit_stream, i_bits );
return( p_bit_stream->fifo.buffer >> (8 * sizeof(WORD_TYPE) - i_bits) );
/* Now that we have filled in the buffers, do it again. Can't call
* ShowBits() instead, because the function is inline... */
if( p_bit_stream->fifo.i_available >= i_bits )
{
return( p_bit_stream->fifo.buffer >> (8 * sizeof(WORD_TYPE) - i_bits) );
}
return( (p_bit_stream->fifo.buffer |
(WORD_AT( p_bit_stream->p_byte )
>> p_bit_stream->fifo.i_available))
>> (8 * sizeof(WORD_TYPE) - i_bits) );
}
/*****************************************************************************
......
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.130 2001/08/27 16:13:20 massiot Exp $
* $Id: input.c,v 1.131 2001/09/24 11:17:49 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -808,7 +808,7 @@ static void NetworkOpen( input_thread_t * p_input )
if( i_opt < 0x80000 )
{
intf_ErrMsg( "input warning: socket receive buffer size just %d instead of %d bytes.\n",
intf_WarnMsg( 1, "input warning: socket receive buffer size just %d instead of %d bytes.",
i_opt, 0x80000 );
}
......
......@@ -2,7 +2,7 @@
* input_ext-dec.c: services to the decoders
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ext-dec.c,v 1.18 2001/08/22 17:21:45 massiot Exp $
* $Id: input_ext-dec.c,v 1.19 2001/09/24 11:17:49 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -216,6 +216,9 @@ void UnalignedShowBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
AlignWord( p_bit_stream );
}
}
/* We have 32 bits ready for reading, it will be enough. */
break;
}
}
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment