[vlc-commits] video_output: skip epg time if not avail
Francois Cartegnie
git at videolan.org
Thu Dec 21 10:56:37 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 21 10:42:14 2017 +0100| [16592d5615ed925fad4dce7709392f6980553cdc] | committer: Francois Cartegnie
video_output: skip epg time if not avail
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16592d5615ed925fad4dce7709392f6980553cdc
---
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