[vlc-commits] video_output: skip epg time if not avail
Francois Cartegnie
git at videolan.org
Thu Dec 21 11:10:41 CET 2017
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 21 10:42:14 2017 +0100| [6a6051187595df4da6da505218f315c36b996671] | committer: Francois Cartegnie
video_output: skip epg time if not avail
(cherry picked from commit 16592d5615ed925fad4dce7709392f6980553cdc)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6a6051187595df4da6da505218f315c36b996671
---
src/video_output/video_epg.c | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/video_output/video_epg.c b/src/video_output/video_epg.c
index a5c5fafd0f..ddd02609b4 100644
--- a/src/video_output/video_epg.c
+++ b/src/video_output/video_epg.c
@@ -326,9 +326,6 @@ static void vout_FillRightPanel(subpicture_updater_sys_t *p_sys,
float f_progress = 0;
VLC_UNUSED(ry);
- /* Format the hours */
- char *psz_network = vout_OSDPrintTime(p_sys->time);
-
/* Display the name of the channel. */
*last_ptr = vout_OSDEpgText(p_sys->epg->psz_name,
x,
@@ -393,18 +390,25 @@ static void vout_FillRightPanel(subpicture_updater_sys_t *p_sys,
if (*last_ptr)
last_ptr = &(*last_ptr)->p_next;
- *last_ptr = vout_OSDEpgText(psz_network,
- rx,
- y + height * OSDEPG_ROW(0),
- height * EPGOSD_TEXTSIZE_NTWK,
- RGB_COLOR1);
- if(*last_ptr)
+ /* Format the hours */
+ if(p_sys->time)
{
- (*last_ptr)->i_align = SUBPICTURE_ALIGN_TOP|SUBPICTURE_ALIGN_RIGHT;
- last_ptr = &(*last_ptr)->p_next;
+ char *psz_network = vout_OSDPrintTime(p_sys->time);
+ if(psz_network)
+ {
+ *last_ptr = vout_OSDEpgText(psz_network,
+ rx,
+ y + height * OSDEPG_ROW(0),
+ height * EPGOSD_TEXTSIZE_NTWK,
+ RGB_COLOR1);
+ free(psz_network);
+ if(*last_ptr)
+ {
+ (*last_ptr)->i_align = SUBPICTURE_ALIGN_TOP|SUBPICTURE_ALIGN_RIGHT;
+ last_ptr = &(*last_ptr)->p_next;
+ }
+ }
}
-
- free(psz_network);
}
static subpicture_region_t * vout_BuildOSDEpg(subpicture_updater_sys_t *p_sys,
More information about the vlc-commits
mailing list