]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_ogg.c
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7470 d7cf8633-e32d-0410...
[xonotic/darkplaces.git] / snd_ogg.c
index 508614086ca88244115c5b8024718f83a1fc63b9..7c856ce666c43ee511383c3aca730102bd3f53f2 100644 (file)
--- a/snd_ogg.c
+++ b/snd_ogg.c
@@ -219,7 +219,6 @@ static dllfunction_t vorbisfilefuncs[] =
        {"ov_clear",                            (void **) &qov_clear},
        {"ov_info",                                     (void **) &qov_info},
        {"ov_comment",                          (void **) &qov_comment},
-       {"vorbis_comment_query",        (void **) &qvorbis_comment_query},
        {"ov_open_callbacks",           (void **) &qov_open_callbacks},
        {"ov_pcm_seek",                         (void **) &qov_pcm_seek},
        {"ov_pcm_total",                        (void **) &qov_pcm_total},
@@ -547,6 +546,8 @@ static const snd_buffer_t* OGG_FetchSound (channel_t* ch, unsigned int* start, u
                return NULL;
        }
        newlength = per_sfx->format.speed * factor;  // -> 1 sec of sound before resampling
+       if(newlength > (int)sizeof(resampling_buffer))
+               newlength = sizeof(resampling_buffer);
 
        // Decompress in the resampling_buffer
 #if BYTE_ORDER == BIG_ENDIAN