mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
Allocate from heap.
This commit is contained in:
parent
a3816bffa1
commit
b1feed9d2b
@ -450,7 +450,8 @@ int ffemu_finalize(ffemu_t *handle)
|
|||||||
deinit_thread(handle);
|
deinit_thread(handle);
|
||||||
|
|
||||||
// Push out frames still stuck in queue.
|
// Push out frames still stuck in queue.
|
||||||
uint16_t video_buf[512 * 448];
|
uint16_t *video_buf = malloc(512 * 448 * sizeof(uint16_t));
|
||||||
|
assert(video_buf);
|
||||||
int16_t audio_buf[128 * handle->params.channels];
|
int16_t audio_buf[128 * handle->params.channels];
|
||||||
struct ffemu_video_data attr_buf;
|
struct ffemu_video_data attr_buf;
|
||||||
|
|
||||||
@ -462,6 +463,8 @@ int ffemu_finalize(ffemu_t *handle)
|
|||||||
ffemu_push_video_thread(handle, &attr_buf);
|
ffemu_push_video_thread(handle, &attr_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(video_buf);
|
||||||
|
|
||||||
while (fifo_read_avail(handle->audio_fifo) >= sizeof(audio_buf))
|
while (fifo_read_avail(handle->audio_fifo) >= sizeof(audio_buf))
|
||||||
{
|
{
|
||||||
fifo_read(handle->audio_fifo, audio_buf, sizeof(audio_buf));
|
fifo_read(handle->audio_fifo, audio_buf, sizeof(audio_buf));
|
||||||
@ -512,7 +515,8 @@ static int SDLCALL ffemu_thread(void *data)
|
|||||||
{
|
{
|
||||||
ffemu_t *ff = data;
|
ffemu_t *ff = data;
|
||||||
|
|
||||||
uint16_t video_buf[512 * 448];
|
uint16_t *video_buf = malloc(512 * 448 * sizeof(uint16_t));
|
||||||
|
assert(video_buf);
|
||||||
int16_t audio_buf[128 * ff->params.channels];
|
int16_t audio_buf[128 * ff->params.channels];
|
||||||
struct ffemu_video_data attr_buf;
|
struct ffemu_video_data attr_buf;
|
||||||
|
|
||||||
@ -572,5 +576,7 @@ static int SDLCALL ffemu_thread(void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(video_buf);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user