[vlc-devel] [PATCH 4/6] vout: spu: move late into spu_render_entry_t
Thomas Guillem
thomas at gllm.fr
Thu Jun 6 15:19:28 CEST 2019
This will allow to remove one extra allocation.
---
src/video_output/vout_subpictures.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 51095aba72..0e02d446df 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -57,6 +57,7 @@ typedef struct {
subpicture_t *subpic;
vlc_tick_t start;
vlc_tick_t stop;
+ bool is_late;
} spu_render_entry_t;
struct spu_channel {
@@ -645,7 +646,6 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now,
struct spu_channel *channel = &sys->channels.data[i];
spu_render_entry_t *render_entries = channel->entries;
spu_render_entry_t available_entries[VOUT_MAX_SUBPICTURES];
- bool is_available_late[VOUT_MAX_SUBPICTURES];
size_t available_count = 0;
vlc_tick_t start_date = render_subtitle_date;
@@ -698,7 +698,7 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now,
/* */
available_entries[available_count] = *render_entry;
- is_available_late[available_count] = is_late;
+ available_entries[available_count].is_late = is_late;
available_count++;
}
@@ -712,7 +712,7 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now,
for (size_t index = 0; index < available_count; index++) {
spu_render_entry_t *render_entry = &available_entries[index];
subpicture_t *current = render_entry->subpic;
- bool is_late = is_available_late[index];
+ bool is_late = render_entry->is_late;
const vlc_tick_t stop_date = current->b_subtitle ? __MAX(start_date, sys->last_sort_date) : system_now;
const vlc_tick_t ephemer_date = current->b_subtitle ? ephemer_subtitle_date : ephemer_osd_date;
--
2.20.1
More information about the vlc-devel
mailing list