diff options
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 0e337ef63c..ef40ea6e28 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -2721,6 +2721,11 @@ enum plugin_status plugin_start(const void *parameter) buf = rb->plugin_get_buffer(&buf_size); #else buf = rb->plugin_get_audio_buffer(&buf_size); + if ((uintptr_t)buf < (uintptr_t)plugin_start_addr) + { + uint32_t tmp_size = (uintptr_t)plugin_start_addr - (uintptr_t)buf; + buf_size = MIN(buf_size, tmp_size); + } #endif ret = main(); #ifdef HAVE_ADJUSTABLE_CPU_FREQ |