X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=dpvsimpledecode.c;h=2cf5e82f6aa45a0d3c0576aed4a87e9677b94c78;hb=51060d945ef856d4f54728526df21c551b8e4dcf;hp=8ad43beab3736e9292b3106a26cdda7c4d88076d;hpb=0f80ff51ff9f369233d17b3377d3a0d34b4c8e5a;p=xonotic%2Fdarkplaces.git diff --git a/dpvsimpledecode.c b/dpvsimpledecode.c index 8ad43bea..2cf5e82f 100644 --- a/dpvsimpledecode.c +++ b/dpvsimpledecode.c @@ -1,4 +1,3 @@ - #include "quakedef.h" #include "dpvsimpledecode.h" @@ -333,7 +332,7 @@ static int dpvsimpledecode_setpixelformat(dpvsimpledecodestream_t *s, unsigned i // opening and closing streams // opens a stream -void *dpvsimpledecode_open(char *filename, const char **errorstring) +void *dpvsimpledecode_open(clvideo_t *video, char *filename, const char **errorstring) { dpvsimpledecodestream_t *s; char t[8], *wavename; @@ -385,7 +384,14 @@ void *dpvsimpledecode_open(char *filename, const char **errorstring) Z_Free(wavename); } // all is well... + // set the module functions s->videoframenum = -10000; + video->close = dpvsimpledecode_close; + video->getwidth = dpvsimpledecode_getwidth; + video->getheight = dpvsimpledecode_getheight; + video->getframerate = dpvsimpledecode_getframerate; + video->decodeframe = dpvsimpledecode_video; + return s; } else if (errorstring != NULL) @@ -423,7 +429,7 @@ void dpvsimpledecode_close(void *stream) if (s->videopixels) Z_Free(s->videopixels); if (s->sndchan != -1) - S_StopChannel (s->sndchan, true); + S_StopChannel (s->sndchan, true, true); if (s->framedatablocks) hz_bitstream_read_blocks_free(s->framedatablocks); if (s->bitstream) @@ -506,10 +512,6 @@ double dpvsimpledecode_getframerate(void *stream) return s->info_framerate; } - - - - static int dpvsimpledecode_convertpixels(dpvsimpledecodestream_t *s, void *imagedata, int imagebytesperrow) { unsigned int a, x, y, width, height;