summaryrefslogtreecommitdiff
path: root/src/audio/stb_vorbis.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-10-09 21:51:36 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-10-09 21:51:36 +0300
commita1101ec38cb29f701457215e35f75904326120cb (patch)
treee0b40731f65b9711d64353a78fd51ffa795b1b67 /src/audio/stb_vorbis.c
parent4bf163ecfac27c3dd86dff96df6f4647f9afe021 (diff)
Support Ogg Vorbis audio
Playback starts as soon as possible, so one can listen while streaming. stb_vorbis.c needed a tiny tweak to not die on a file without (Ogg? Vorbis?) comments.
Diffstat (limited to 'src/audio/stb_vorbis.c')
-rw-r--r--src/audio/stb_vorbis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audio/stb_vorbis.c b/src/audio/stb_vorbis.c
index a8cbfa6c..98b8e649 100644
--- a/src/audio/stb_vorbis.c
+++ b/src/audio/stb_vorbis.c
@@ -3642,8 +3642,8 @@ static int start_decoder(vorb *f)
3642 f->vendor[len] = (char)'\0'; 3642 f->vendor[len] = (char)'\0';
3643 //user comments 3643 //user comments
3644 f->comment_list_length = get32_packet(f); 3644 f->comment_list_length = get32_packet(f);
3645 f->comment_list = (char**)setup_malloc(f, sizeof(char*) * (f->comment_list_length)); 3645 f->comment_list = (char**)setup_malloc(f, sizeof(char*) * (f->comment_list_length + 1));
3646 if (f->comment_list == NULL) return error(f, VORBIS_outofmem); 3646 if (f->comment_list == NULL) return error(f, VORBIS_outofmem);
3647 3647
3648 for(i=0; i < f->comment_list_length; ++i) { 3648 for(i=0; i < f->comment_list_length; ++i) {
3649 len = get32_packet(f); 3649 len = get32_packet(f);