SDL_mixer: music_ogg.c: use a do-nothing close_func() in callbacks

From fe33c67179e121481c1599c4ca9a4cf59a1dfefe Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 28 Oct 2023 23:23:04 +0300
Subject: [PATCH] music_ogg.c: use a do-nothing close_func() in callbacks

earlier versions of libvorbis did not expect a NULL close_func and
segfault upon ov_clear(). same goes for the  current lowmem branch
of tremor..
---
 src/codecs/music_ogg.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/codecs/music_ogg.c b/src/codecs/music_ogg.c
index ac57b8e3..64558f1a 100644
--- a/src/codecs/music_ogg.c
+++ b/src/codecs/music_ogg.c
@@ -182,6 +182,12 @@ static long sdl_tell_func(void *datasource)
     return (long)SDL_RWtell((SDL_RWops*)datasource);
 }
 
+static int sdl_close_func(void *datasource)
+{
+    (void)datasource;
+    return 0;
+}
+
 static int OGG_Seek(void *context, double time);
 static void OGG_Delete(void *context);
 
@@ -250,6 +256,7 @@ static void *OGG_CreateFromRW(SDL_RWops *src, SDL_bool freesrc)
     SDL_zero(callbacks);
     callbacks.read_func = sdl_read_func;
     callbacks.seek_func = sdl_seek_func;
+    callbacks.close_func = sdl_close_func;
     callbacks.tell_func = sdl_tell_func;
 
     if (vorbis.ov_open_callbacks(src, &music->vf, NULL, 0, callbacks) < 0) {