diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2001-08-13 21:48:05 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2001-08-13 21:48:05 +0000 |
commit | 1a56543279a6fd146c8616781b4160e207bb4f6d (patch) | |
tree | 4ca37977d896e803a3990e8491f75d02edf49dfd /libavcodec/common.c | |
parent | d95ecd058e6256b6deacad8b09fbe58b52f07430 (diff) | |
download | ffmpeg-1a56543279a6fd146c8616781b4160e207bb4f6d.tar.gz |
win32 fixes
Originally committed as revision 84 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.c')
-rw-r--r-- | libavcodec/common.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/libavcodec/common.c b/libavcodec/common.c index 7d299a4d45..2f7cafc6eb 100644 --- a/libavcodec/common.c +++ b/libavcodec/common.c @@ -16,20 +16,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#ifdef __FreeBSD__ -#include <sys/param.h> -#endif -#include <netinet/in.h> -#include <math.h> #include "common.h" - -#define NDEBUG -#include <assert.h> - -#include "../bswap.h" +#include <math.h> void init_put_bits(PutBitContext *s, UINT8 *buffer, int buffer_size, @@ -79,7 +67,7 @@ void put_bits(PutBitContext *s, int n, unsigned int value) bit_cnt+=n; } else { bit_buf |= value >> (n + bit_cnt - 32); - *(UINT32 *)s->buf_ptr = htonl(bit_buf); + *(UINT32 *)s->buf_ptr = be2me_32(bit_buf); //printf("bitbuf = %08x\n", bit_buf); s->buf_ptr+=4; if (s->buf_ptr >= s->buf_end) @@ -97,9 +85,9 @@ void put_bits(PutBitContext *s, int n, unsigned int value) } /* return the number of bits output */ -long long get_bit_count(PutBitContext *s) +INT64 get_bit_count(PutBitContext *s) { - return (s->buf_ptr - s->buf + s->data_out_size) * 8 + (long long)s->bit_cnt; + return (s->buf_ptr - s->buf + s->data_out_size) * 8 + (INT64)s->bit_cnt; } void align_put_bits(PutBitContext *s) |