[vlc-devel] [PATCH 15/15] Fix OSD text not displayed if SPU clock exists
Roland Bewick
roland.bewick at gmail.com
Tue May 14 11:40:14 CEST 2019
This fix is for an existing bug which causes OSD text not to show (OSD text that should be shown immediately gets converted to movie time)
---
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 33989a9392..6ac9bc2d60 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