From ab8d562f8b6f5f030acf9eb9478a35fffa057795 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 24 Sep 2004 04:41:15 +0000 Subject: [PATCH] fixing avi files. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@243 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/m_mp3.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/engine/client/m_mp3.c b/engine/client/m_mp3.c index a53fe99c3..d5e082662 100644 --- a/engine/client/m_mp3.c +++ b/engine/client/m_mp3.c @@ -1173,7 +1173,7 @@ qboolean Media_ShowFilm(void) lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(pgf, currentframe); // Grab Data From The AVI Stream currentframe++; - if (!lpbi)//oops + if (!lpbi || lpbi->biBitCount != 24)//oops { SCR_SetUpToDrawConsole(); #ifdef SWQUAKE @@ -1184,7 +1184,7 @@ qboolean Media_ShowFilm(void) } else { - Media_ShowFrameBGR_24_Flip(staticfilmimage, imagewidth, imageheight); + Media_ShowFrameBGR_24_Flip((char*)lpbi+lpbi->biSize, lpbi->biWidth, lpbi->biHeight); } if (pavisound) @@ -1452,8 +1452,8 @@ void Media_RecordFilm_f (void) Con_Printf("Failed to open\n"); return; } - - + + memset(&bitmap_info_header, 0, sizeof(BITMAPINFOHEADER)); bitmap_info_header.biSize = 40; bitmap_info_header.biWidth = glwidth; @@ -1463,7 +1463,7 @@ void Media_RecordFilm_f (void) bitmap_info_header.biCompression = BI_RGB; bitmap_info_header.biSizeImage = glwidth*glheight * 3; - + memset(&stream_header, 0, sizeof(stream_header)); stream_header.fccType = streamtypeVIDEO; stream_header.fccHandler = recordavi_codec_fourcc; @@ -1605,9 +1605,6 @@ void Media_RecordFilm_f (void){} void M_Menu_Media_f (void) {} char *Media_NextTrack(void) {return NULL;} -void Media_ShowFrame(qbyte *framedata, int inwidth, int inheight, qbyte *bgrandupsidedown) {} -void Media_ShowFrame8bit(qbyte *framedata, int inwidth, int inheight, qbyte *palette) {} - int filmtexture; media_filmtype_t media_filmtype;