[vlc-devel] [PATCH 14/14] Fixed OSD text not showing if an SPU clock has been added
Roland Bewick
roland.bewick at gmail.com
Sat May 11 08:32:18 CEST 2019
---
src/video_output/vout_subpictures.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index b46e8681d1..af09a34d47 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -608,12 +608,21 @@ static int SpuConvertDates(spu_t *spu, vlc_tick_t system_now,
render_entry->subpicture = NULL;
else
{
- int clock_index = SpuGetClockIndex(spu, current->p_clock);
render_entry->subpicture = current;
- render_entry->start =
- date_array[clock_index][entry_count * 2];
- render_entry->stop =
- date_array[clock_index][entry_count * 2 + 1];
+
+ if (current->b_subtitle)
+ {
+ int clock_index = SpuGetClockIndex(spu, current->p_clock);
+ render_entry->start = date_array[clock_index][entry_count * 2];
+ render_entry->stop = date_array[clock_index][entry_count * 2 + 1];
+ }
+ else
+ {
+ /* Don't use clock time for OSD text */
+ render_entry->start = current->i_start;
+ render_entry->stop = current->i_stop;
+ }
+
entry_count++;
}
}
--
2.11.0
More information about the vlc-devel
mailing list