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/mpeg12.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/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 10e178efbb..79bf31dff0 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -16,26 +16,28 @@ * 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> #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" #include "mpeg12data.h" -#ifdef USE_FASTMEMCPY -#include "fastmemcpy.h" -#endif //#define DEBUG +#ifndef CONFIG_WIN32 + #ifdef DEBUG #define dprintf(fmt,args...) printf(fmt, ## args) #else #define dprintf(fmt,args...) #endif +#else + +inline void dprintf(const char* fmt,...) {} + +#endif + /* Start codes. */ #define SEQ_END_CODE 0x000001b7 #define SEQ_START_CODE 0x000001b3 @@ -118,11 +120,11 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) fps = frame_rate_tab[s->frame_rate_index]; time_code = s->fake_picture_number * FRAME_RATE_BASE; s->gop_picture_number = s->fake_picture_number; - put_bits(&s->pb, 5, (time_code / (fps * 3600)) % 24); - put_bits(&s->pb, 6, (time_code / (fps * 60)) % 60); + put_bits(&s->pb, 5, (UINT32)((time_code / (fps * 3600)) % 24)); + put_bits(&s->pb, 6, (UINT32)((time_code / (fps * 60)) % 60)); put_bits(&s->pb, 1, 1); - put_bits(&s->pb, 6, (time_code / fps) % 60); - put_bits(&s->pb, 6, (time_code % fps) / FRAME_RATE_BASE); + put_bits(&s->pb, 6, (UINT32)((time_code / fps) % 60)); + put_bits(&s->pb, 6, (UINT32)((time_code % fps) / FRAME_RATE_BASE)); put_bits(&s->pb, 1, 1); /* closed gop */ put_bits(&s->pb, 1, 0); /* broken link */ } |