]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_ogg.c
eliminated channel_t reference in OGG_FetchEnd
[xonotic/darkplaces.git] / snd_ogg.c
index ccedb504c5e7260d69c3b6e5bc5d7246871425d1..b8ab271fa9cd78b4118773632c43f2ef0e5ddafe 100644 (file)
--- a/snd_ogg.c
+++ b/snd_ogg.c
@@ -567,24 +567,18 @@ static const snd_buffer_t* OGG_FetchSound (void *sfxfetcher, void **chfetcherpoi
 OGG_FetchEnd
 ====================
 */
-static void OGG_FetchEnd (channel_t* ch)
+static void OGG_FetchEnd (void **chfetcherpointer)
 {
-       ogg_stream_perchannel_t* per_ch;
+       ogg_stream_perchannel_t* per_ch = (ogg_stream_perchannel_t *)*chfetcherpointer;
 
-       per_ch = (ogg_stream_perchannel_t *)ch->fetcher_data;
        if (per_ch != NULL)
        {
-               size_t buff_len;
-
                // Free the ogg vorbis decoder
                qov_clear (&per_ch->vf);
 
-               buff_len = per_ch->sb.maxframes * per_ch->sb.format.channels * per_ch->sb.format.width;
-               ch->sfx->memsize -= sizeof (*per_ch) - sizeof (per_ch->sb.samples) + buff_len;
-
                Mem_Free (per_ch);
-               ch->fetcher_data = NULL;
        }
+       *chfetcherpointer = NULL;
 }