From c176cb058d40d83b4c1c401bc5772201034d2f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Wed, 20 Apr 2011 22:20:05 +0200 Subject: [PATCH] glw: Stop clock driving subtitles when paused Otherwise subtitles will disappear shortly after video is paused. Fixed ticket #463 --- src/ui/glw/glw_video_common.c | 3 ++- src/ui/glw/glw_video_opengl.c | 5 ++--- src/ui/glw/glw_video_rsx.c | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ui/glw/glw_video_common.c b/src/ui/glw/glw_video_common.c index 46b62124ac..1ab91ea8c7 100644 --- a/src/ui/glw/glw_video_common.c +++ b/src/ui/glw/glw_video_common.c @@ -233,7 +233,8 @@ glw_video_newframe(glw_t *w, int flags) pts = gv->gv_cfg_cur.gvc_engine->gve_newframe(gv, vd, flags); - glw_video_overlay_layout(gv, pts, vd); + if(pts != AV_NOPTS_VALUE) + glw_video_overlay_layout(gv, pts, vd); } diff --git a/src/ui/glw/glw_video_opengl.c b/src/ui/glw/glw_video_opengl.c index e7e5c3fc39..2796757f3e 100644 --- a/src/ui/glw/glw_video_opengl.c +++ b/src/ui/glw/glw_video_opengl.c @@ -382,8 +382,6 @@ yuvp_newframe(glw_video_t *gv, video_decoder_t *vd, int flags) gv->gv_sa = NULL; } - pts = AV_NOPTS_VALUE; - } else { /* There are frames available that we are going to display, @@ -394,7 +392,8 @@ yuvp_newframe(glw_video_t *gv, video_decoder_t *vd, int flags) /* */ sb = TAILQ_NEXT(sa, gvs_link); - pts = gv_compute_blend(gv, sa, sb, output_duration); + if(!vd->vd_hold) + pts = gv_compute_blend(gv, sa, sb, output_duration); epoch = sa->gvs_epoch; if(!vd->vd_hold || sb != NULL) { diff --git a/src/ui/glw/glw_video_rsx.c b/src/ui/glw/glw_video_rsx.c index fad7492b04..cd587dc3de 100644 --- a/src/ui/glw/glw_video_rsx.c +++ b/src/ui/glw/glw_video_rsx.c @@ -309,7 +309,7 @@ yuvp_newframe(glw_video_t *gv, video_decoder_t *vd, int flags) glw_video_surface_t *sa, *sb, *s; media_pipe_t *mp = gv->gv_mp; int output_duration; - int64_t pts = 0; + int64_t pts = AV_NOPTS_VALUE; int frame_duration = gv->w.glw_root->gr_frameduration; int epoch = 0; @@ -331,8 +331,6 @@ yuvp_newframe(glw_video_t *gv, video_decoder_t *vd, int flags) gv->gv_sa = NULL; } - pts = AV_NOPTS_VALUE; - } else { /* There are frames available that we are going to display, @@ -343,7 +341,8 @@ yuvp_newframe(glw_video_t *gv, video_decoder_t *vd, int flags) /* */ sb = TAILQ_NEXT(sa, gvs_link); - pts = gv_compute_blend(gv, sa, sb, output_duration); + if(!vd->vd_hold) + pts = gv_compute_blend(gv, sa, sb, output_duration); epoch = sa->gvs_epoch; if(!vd->vd_hold || sb != NULL) {