void-packages/srcpkgs/moc/patches/move-pcm-buffer-to-heap.patch

29 lines
710 B
Diff

--- player.c 2018-02-10 23:53:38.627091352 +0100
+++ player.c 2018-02-10 23:54:46.672519217 +0100
@@ -444,7 +444,7 @@
{
bool eof = false;
bool stopped = false;
- char buf[PCM_BUF_SIZE];
+ char *const buf = xmalloc (PCM_BUF_SIZE);
int decoded = 0;
struct sound_params new_sound_params;
bool sound_params_change = false;
@@ -486,7 +486,7 @@
status_msg ("Playing...");
}
- decoded = f->decode (decoder_data, buf, sizeof(buf),
+ decoded = f->decode (decoder_data, buf, PCM_BUF_SIZE,
&new_sound_params);
if (decoded)
@@ -629,6 +629,7 @@
precache.f->close (precache.decoder_data);
precache_reset (&precache);
}
+ free (buf);
}
#if !defined(NDEBUG) && defined(DEBUG)