vlc | branch: master | Thomas Guillem <[email protected]> | Thu Jun 6 10:18:17 2019 +0200| [c6673b9f1e69a569a73df3d97b16d483c254a800] | committer: Thomas Guillem
vout: spu: move late into spu_render_entry_t This will allow to remove one extra allocation. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6673b9f1e69a569a73df3d97b16d483c254a800 --- 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 3b62746eb2..f6d2e4a586 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 { @@ -647,7 +648,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; @@ -700,7 +700,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++; } @@ -714,7 +714,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; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
